1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/nsvdec: Check av_get_packet() return value

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-01-17 16:05:08 +01:00
parent e0623953e1
commit edf1cb7aee

View File

@ -595,9 +595,11 @@ null_chunk_retry:
st[s->streams[1]->id] = s->streams[1];
if (vsize && st[NSV_ST_VIDEO]) {
int ret;
nst = st[NSV_ST_VIDEO]->priv_data;
pkt = &nsv->ahead[NSV_ST_VIDEO];
av_get_packet(pb, pkt, vsize);
if ((ret = av_get_packet(pb, pkt, vsize)) < 0)
return ret;
pkt->stream_index = st[NSV_ST_VIDEO]->index;//NSV_ST_VIDEO;
pkt->dts = nst->frame_offset;
pkt->flags |= nsv->state == NSV_HAS_READ_NSVS ? AV_PKT_FLAG_KEY : 0; /* keyframe only likely on a sync frame */