aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-02-22 01:07:46 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-02-22 01:07:46 +0000
commitbc64cb96805fc6ae435b39c7ba1052304a27f5b5 (patch)
tree4ece7e16d4675db5773fcd7b3553476e48e16815
parentc027e91a744c5875a47e5d4bb2a0ff9b112d2e0f (diff)
downloadffmpeg-bc64cb96805fc6ae435b39c7ba1052304a27f5b5.tar.gz
check av_get_packet return value
Originally committed as revision 17514 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/mov.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 449bbc7eb5..4f409493f2 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1942,7 +1942,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
MOVStreamContext *sc = 0;
AVIndexEntry *sample = 0;
int64_t best_dts = INT64_MAX;
- int i;
+ int i, ret;
retry:
for (i = 0; i < s->nb_streams; i++) {
AVStream *st = s->streams[i];
@@ -1979,7 +1979,9 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
sc->ffindex, sample->pos);
return -1;
}
- av_get_packet(sc->pb, pkt, sample->size);
+ ret = av_get_packet(sc->pb, pkt, sample->size);
+ if (ret < 0)
+ return ret;
#if CONFIG_DV_DEMUXER
if (mov->dv_demux && sc->dv_audio_container) {
dv_produce_packet(mov->dv_demux, pkt, pkt->data, pkt->size);