On Wed, Nov 1, 2017 at 6:33 PM, Carl Eugen Hoyos <ceffm...@gmail.com> wrote:
> 2017-11-01 18:18 GMT+01:00 Hendrik Leppkes <h.lepp...@gmail.com>:
>> On Wed, Nov 1, 2017 at 5:13 PM, Carl Eugen Hoyos <ceffm...@gmail.com> wrote:
>>> Hi!
>>>
>>> Attached patch silences a gcc warning, tested with Fever.vob
>>>
>>>
>>> @@ -163,10 +162,12 @@ static void *pcm_dvd_decode_samples(AVCodecContext 
>>> *avctx, const uint8_t *src,
>>>     switch (avctx->bits_per_coded_sample) {
>>>     case 16: {
>>> #if HAVE_BIGENDIAN
>>> +        int8_t *dst16 = dst;
>>>         bytestream2_get_buffer(&gb, dst16, blocks * s->block_size);
>>> -        dst16 += blocks * s->block_size / 2;
>>> +        dst16 += blocks * s->block_size;
>>> #else
>>>         int samples = blocks * avctx->channels;
>>> +        int16_t *dst16 = dst;
>>>         do {
>>>             *dst16++ = bytestream2_get_be16u(&gb);
>>>         } while (--samples);
>>
>> This results in quite misleading code. dst16 is named like that
>> because its a 16-bit pointer, using the same pointer with different
>> types based on this ifdef seems error-prone in the future.
>
> Agree, new patch attached.
>

I think you attached the wrong patch, this is an old version of the
pcm-bluray patch.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to