mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-04 02:47:45 +00:00
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:
parent
c81604f862
commit
feb993e579
3 changed files with 16 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue