comparison avcodec.h @ 9360:66e270967340 libavcodec

Add av_shrink_packet function for use in av_get_packet that reduces pkt->size and ensures the following padding is correctly initialized to 0.
author reimar
date Wed, 08 Apr 2009 20:19:12 +0000
parents f978e4a699c5
children d322325fc00e
comparison
equal deleted inserted replaced
9359:f978e4a699c5 9360:66e270967340
2653 * @return 0 if OK, AVERROR_xxx otherwise 2653 * @return 0 if OK, AVERROR_xxx otherwise
2654 */ 2654 */
2655 int av_new_packet(AVPacket *pkt, int size); 2655 int av_new_packet(AVPacket *pkt, int size);
2656 2656
2657 /** 2657 /**
2658 * Reduce packet size, correctly zeroing padding
2659 *
2660 * @param pkt packet
2661 * @param size new size
2662 */
2663 void av_shrink_packet(AVPacket *pkt, int size);
2664
2665 /**
2658 * @warning This is a hack - the packet memory allocation stuff is broken. The 2666 * @warning This is a hack - the packet memory allocation stuff is broken. The
2659 * packet is allocated if it was not really allocated. 2667 * packet is allocated if it was not really allocated.
2660 */ 2668 */
2661 int av_dup_packet(AVPacket *pkt); 2669 int av_dup_packet(AVPacket *pkt);
2662 2670