X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Frl2.c;h=78edec5b1825df2e121c2f5847ae6bd47d547e21;hb=178f8ea76e52f79e2b7f4a01973d11f5c518f915;hp=530e0dfb9a2eb6b8c78b4346b400d1a48c5ff590;hpb=ec8a3e25d8cfed9f8f335b88d8162ae331b68df9;p=ffmpeg diff --git a/libavformat/rl2.c b/libavformat/rl2.c index 530e0dfb9a2..78edec5b182 100644 --- a/libavformat/rl2.c +++ b/libavformat/rl2.c @@ -138,6 +138,9 @@ static av_cold int rl2_read_header(AVFormatContext *s, /** setup audio stream if present */ if(sound_rate){ + if(channels <= 0) + return AVERROR_INVALIDDATA; + pts_num = def_sound_size; pts_den = rate;