flvdec: Treat all nellymoser versions as the same codec
authorMartin Storsjö <martin@martin.st>
Thu, 5 Jul 2012 06:47:29 +0000 (09:47 +0300)
committerMartin Storsjö <martin@martin.st>
Thu, 5 Jul 2012 19:07:45 +0000 (22:07 +0300)
This avoids creating new AVStreams for them when switching between
different variants of them, since we can handle changes between
different sample rates of nellymoser within the same stream.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/flvdec.c

index 602cb9e..12c2504 100644 (file)
@@ -113,11 +113,7 @@ static int flv_same_audio_codec(AVCodecContext *acodec, int flags)
     case FLV_CODECID_MP3:
         return acodec->codec_id == CODEC_ID_MP3;
     case FLV_CODECID_NELLYMOSER_8KHZ_MONO:
-        return acodec->sample_rate == 8000 &&
-               acodec->codec_id == CODEC_ID_NELLYMOSER;
     case FLV_CODECID_NELLYMOSER_16KHZ_MONO:
-        return acodec->sample_rate == 16000 &&
-               acodec->codec_id == CODEC_ID_NELLYMOSER;
     case FLV_CODECID_NELLYMOSER:
         return acodec->codec_id == CODEC_ID_NELLYMOSER;
     case FLV_CODECID_PCM_MULAW: