[vlc-devel] [PATCH] [RFC] avcodec: recover the source visible area when going through the decoder
Rémi Denis-Courmont
remi at remlab.net
Mon Apr 16 10:05:24 CEST 2018
Le 16 avril 2018 10:46:23 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>Le 16/04/2018 à 09:33, Steve Lhomme a écrit :
>> Fixes #12767
>
>It may for for the case we want the container to overwrite what the
>decoder finds. But if the container is wrong then the display will be
>wrong. Not sure if that's a common case.
>
>If the container/packetizer doesn't set a value then there's no change.
>
>> ---
>> modules/codec/avcodec/video.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/modules/codec/avcodec/video.c
>b/modules/codec/avcodec/video.c
>> index b505d34846..b77f3d85c4 100644
>> --- a/modules/codec/avcodec/video.c
>> +++ b/modules/codec/avcodec/video.c
>> @@ -165,8 +165,8 @@ static int lavc_GetVideoFormat(decoder_t *dec,
>video_format_t *restrict fmt,
>>
>> fmt->i_width = width;
>> fmt->i_height = height;
>> - fmt->i_visible_width = ctx->width;
>> - fmt->i_visible_height = ctx->height;
>> + fmt->i_visible_width = dec->fmt_in.video.i_visible_width ? :
>(unsigned) ctx->width;
>> + fmt->i_visible_height = dec->fmt_in.video.i_visible_height ? :
>(unsigned) ctx->height;
>>
>> /* If an aspect-ratio was specified in the input format then
>force it */
>> if (dec->fmt_in.video.i_sar_num > 0 &&
>dec->fmt_in.video.i_sar_den > 0)
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel
Neither cases are common, but both do occur, AFAIK. AFAICT, the only way to fix this is to have libavcodec do the disambiguation, not VLC.
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
More information about the vlc-devel
mailing list