mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-18 12:56:56 +00:00
Correctly set packet size for partial video packets in nuv demuxer.
Originally committed as revision 18379 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
feb993e579
commit
9470511185
@ -227,6 +227,8 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) {
|
|||||||
memcpy(pkt->data, hdr, copyhdrsize);
|
memcpy(pkt->data, hdr, copyhdrsize);
|
||||||
ret = get_buffer(pb, pkt->data + copyhdrsize, size);
|
ret = get_buffer(pb, pkt->data + copyhdrsize, size);
|
||||||
if (ret < 0) return ret;
|
if (ret < 0) return ret;
|
||||||
|
if (ret < size)
|
||||||
|
av_shrink_packet(pkt, copyhdrsize + ret);
|
||||||
return 0;
|
return 0;
|
||||||
case NUV_AUDIO:
|
case NUV_AUDIO:
|
||||||
if (ctx->a_id < 0) {
|
if (ctx->a_id < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user