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. Originally committed as revision 18378 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -272,7 +272,7 @@ int av_get_packet(ByteIOContext *s, AVPacket *pkt, int size)
|
||||
if(ret<=0)
|
||||
av_free_packet(pkt);
|
||||
else
|
||||
pkt->size= ret;
|
||||
av_shrink_packet(pkt, ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user