aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mpc8.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-16 21:53:50 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-16 21:53:50 +0100
commit5339a9f000519851d111d747a9c582981be7ee82 (patch)
tree263715bdda7df2c5cad55d74d98a4d80b6779773 /libavformat/mpc8.c
parentbd953f94044eec49142d3d61993682f8b2186613 (diff)
parentb19eafa2b930ee40abfde6d1f026b7fa5591c4dc (diff)
downloadffmpeg-5339a9f000519851d111d747a9c582981be7ee82.tar.gz
Merge commit 'b19eafa2b930ee40abfde6d1f026b7fa5591c4dc' into release/0.10
* commit 'b19eafa2b930ee40abfde6d1f026b7fa5591c4dc': eacmv: Make sure a reference frame exists before referencing it mpeg4videodec: Check the width/height in mpeg4_decode_sprite_trajectory ivi_common: Make sure color planes have been initialized oggparseogm: Convert to use bytestream2 rv34: Check the return value from ff_rv34_decode_init matroskadec: Verify realaudio codec parameters mace: Make sure that the channel count is set to a valid value svq3: Check for any negative return value from ff_h264_check_intra_pred_mode vp3: Check the framerate for validity cavsdec: Make sure a sequence header has been decoded before decoding pictures sierravmd: Do sanity checking of frame sizes omadec: Properly check lengths before incrementing the position mpc8: Make sure the first stream exists before parsing the seek table Conflicts: libavcodec/eacmv.c libavcodec/mpeg4videodec.c libavformat/omadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpc8.c')
-rw-r--r--libavformat/mpc8.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c
index 4117d03e5a..a3fc1be894 100644
--- a/libavformat/mpc8.c
+++ b/libavformat/mpc8.c
@@ -137,6 +137,11 @@ static void mpc8_parse_seektable(AVFormatContext *s, int64_t off)
int i, t, seekd;
GetBitContext gb;
+ if (s->nb_streams == 0) {
+ av_log(s, AV_LOG_ERROR, "No stream added before parsing seek table\n");
+ return;
+ }
+
avio_seek(s->pb, off, SEEK_SET);
mpc8_get_chunk_header(s->pb, &tag, &size);
if(tag != TAG_SEEKTABLE){