Merge commit '6bf4c1d71199b92894f24db6386ed5070e590a16'
authorHendrik Leppkes <h.leppkes@gmail.com>
Fri, 1 Jan 2016 14:59:30 +0000 (15:59 +0100)
committerHendrik Leppkes <h.leppkes@gmail.com>
Fri, 1 Jan 2016 14:59:30 +0000 (15:59 +0100)
* commit '6bf4c1d71199b92894f24db6386ed5070e590a16':
  r3d: do not create the audio stream until we know the sample rate

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
1  2 
libavformat/r3d.c

@@@ -340,9 -350,9 +353,9 @@@ static int r3d_read_packet(AVFormatCont
                  return 0;
              break;
          case MKTAG('R','E','D','A'):
-             if (s->nb_streams < 2)
+             if (!r3d->audio_channels)
                  return -1;
--            if (s->streams[1]->discard == AVDISCARD_ALL)
++            if (s->nb_streams >= 2 && s->streams[1]->discard == AVDISCARD_ALL)
                  goto skip;
              if (!(err = r3d_read_reda(s, pkt, &atom)))
                  return 0;