[FFmpeg-devel] [PATCH] avformat/nsvdec: remove case which is no longer possible

Paul B Mahol onemda at gmail.com
Wed Jan 28 13:00:31 CET 2015


On 1/28/15, wm4 <nfxjfg at googlemail.com> wrote:
> On Wed, 28 Jan 2015 09:35:57 +0000
> Paul B Mahol <onemda at gmail.com> wrote:
>
>> Check of channels !=0 is right above.
>>
>> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>> ---
>>  libavformat/nsvdec.c | 5 +----
>>  1 file changed, 1 insertion(+), 4 deletions(-)
>>
>> diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c
>> index 531e273..632667c 100644
>> --- a/libavformat/nsvdec.c
>> +++ b/libavformat/nsvdec.c
>> @@ -630,10 +630,7 @@ null_chunk_retry:
>>                  if (bps != 16) {
>>                      av_dlog(s, "NSV AUDIO bit/sample != 16 (%d)!!!\n",
>> bps);
>>                  }
>> -                if(channels)
>> -                    bps /= channels; // ???
>> -                else
>> -                    av_log(s, AV_LOG_WARNING, "Channels is 0\n");
>> +                bps /= channels; // ???
>>                  if (bps == 8)
>>                      st[NSV_ST_AUDIO]->codec->codec_id =
>> AV_CODEC_ID_PCM_U8;
>>                  samplerate /= 4;/* UGH ??? XXX */
>
> And what's the "???" about? Also lol at "UGH ??? XXX".

It is there from beginning. I just posted patch to remove code that is
no longer reached.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list