diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-04-09 00:20:42 +0400 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-04-09 00:20:42 +0400 |
commit | 9470511185393b6c921df679f532bc6bad98a078 (patch) | |
tree | 1fafd2c70cab2d5d5511fde9a30794b6ef8ccf48 /libavformat/nuv.c | |
parent | feb993e5794b3dacb51085a9b77013495eb6dd1c (diff) |
Correctly set packet size for partial video packets in nuv demuxer.
Originally committed as revision 18379 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/nuv.c')
-rw-r--r-- | libavformat/nuv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/nuv.c b/libavformat/nuv.c index b643229429..a6e8e013fc 100644 --- a/libavformat/nuv.c +++ b/libavformat/nuv.c @@ -227,6 +227,8 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) { memcpy(pkt->data, hdr, copyhdrsize); ret = get_buffer(pb, pkt->data + copyhdrsize, size); if (ret < 0) return ret; + if (ret < size) + av_shrink_packet(pkt, copyhdrsize + ret); return 0; case NUV_AUDIO: if (ctx->a_id < 0) { |