[FFmpeg-devel] [PATCH] LPCM in MPEG-TS, next iteration

Christian P. Schmidt schmidt
Sat Aug 15 01:40:23 CEST 2009


Reimar D?ffinger wrote:
> On Sat, Aug 15, 2009 at 02:14:05AM +0300, Christian P. Schmidt wrote:
>> Reimar D?ffinger wrote:
>>> On Fri, Aug 14, 2009 at 06:54:39PM +0300, Christian P. Schmidt wrote:
>>>> +static av_cold int pcm_bluray_decode_init(AVCodecContext *avctx)
>>>> +{
>>>> +    avctx->sample_fmt = SAMPLE_FMT_NONE; ///< Will be determined from the header
>>>> +    return 0;
>>>> +}
>>> Is this necessary?
>> I removed the sample_fmt initialization. The function seems necessary as
>>  ffplay crashed on me without, and with NULL in it's place down in the
>> codec struct.
> That sounds wrong, please send some debugging info.

Odd. I remember another issue I produced somewhere along the way,
apparently the fix for that fixed what was causing the crashes without
init, too. Removed the now useless function.

>>>> +    const uint8_t bits_per_samples[4] = { 0, 16, 20, 24 };
>>>> +    const int64_t channel_layouts[16] = {
>>>> +    const uint8_t channels[16] = {
>>>> +    const int sample_rates[16] = {
>>> I think these also should be static.
>>> Also why is channel_layouts 64 bits and signed?
>>> A switch-case would make slightly more sense for sample_rates, too.
>> There no need for static as they are inside the function, and noone else
>> needs them.
> Hm? The point of static is to make sure the compiler doesn't do something
> silly like constructing the table at runtime on the stack...

Seems I misunderstood your intentions. Added static.

Regards,
Christian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: lpcm-mpegts.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090815/ceb4ec42/attachment.asc>



More information about the ffmpeg-devel mailing list