[FFmpeg-devel] [PATCH] don't assign channels needlessly in audio.c

Benoit Fouet benoit.fouet
Thu Aug 7 08:57:20 CEST 2008


Michael Niedermayer wrote:
> On Wed, Aug 06, 2008 at 03:07:49PM +0200, Benoit Fouet wrote:
>   
>> Index: libavdevice/audio.c
>> ===================================================================
>> --- libavdevice/audio.c	(revision 14643)
>> +++ libavdevice/audio.c	(working copy)
>> @@ -129,8 +129,6 @@
>>          av_log(NULL, AV_LOG_ERROR, "SNDCTL_DSP_STEREO: %s\n", strerror(errno));
>>          goto fail;
>>      }
>> -    if (tmp)
>> -        s->channels = 2;
>>  
>>      tmp = s->sample_rate;
>>      err = ioctl(audio_fd, SNDCTL_DSP_SPEED, &tmp);
>>     
>
> ok
>
>
>   
>> @@ -236,7 +234,6 @@
>>      st->codec->codec_type = CODEC_TYPE_AUDIO;
>>      st->codec->codec_id = s->codec_id;
>>      st->codec->sample_rate = s->sample_rate;
>> -    st->codec->channels = s->channels;
>>  
>>      av_set_pts_info(st, 64, 1, 1000000);  /* 64 bits pts in us */
>>     
>
> where is st->codec->channels set if this is removed ?
>
>   

nowhere, I overlooked that

Applied the first part

-- 
Benoit Fouet
Purple Labs S.A.
www.purplelabs.com




More information about the ffmpeg-devel mailing list