[FFmpeg-cvslog] avformat/nsvdec: Check av_get_packet() return value

Michael Niedermayer git at videolan.org
Sat Jan 17 16:33:18 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jan 17 16:05:08 2015 +0100| [edf1cb7aeea0f8fe0e3e785648a30a7ed99defd0] | committer: Michael Niedermayer

avformat/nsvdec: Check av_get_packet() return value

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=edf1cb7aeea0f8fe0e3e785648a30a7ed99defd0
---

 libavformat/nsvdec.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c
index 05dfd53..f479d1e 100644
--- a/libavformat/nsvdec.c
+++ b/libavformat/nsvdec.c
@@ -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 */



More information about the ffmpeg-cvslog mailing list