Commit 5bc223b1 authored by Anton Khirnov's avatar Anton Khirnov

r3d: fix an invalid read introduced in 6bf4c1d7

parent 64f8c439
...@@ -352,7 +352,7 @@ static int r3d_read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -352,7 +352,7 @@ static int r3d_read_packet(AVFormatContext *s, AVPacket *pkt)
case MKTAG('R','E','D','A'): case MKTAG('R','E','D','A'):
if (!r3d->audio_channels) if (!r3d->audio_channels)
return -1; return -1;
if (s->streams[1]->discard == AVDISCARD_ALL) if (s->nb_streams >= 2 && s->streams[1]->discard == AVDISCARD_ALL)
goto skip; goto skip;
if (!(err = r3d_read_reda(s, pkt, &atom))) if (!(err = r3d_read_reda(s, pkt, &atom)))
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment