[FFmpeg-devel] [PATCH] [dnxhddec] Do not overwrite colorspace if the container has set it.

Michael Niedermayer michael at niedermayer.cc
Tue Nov 28 02:35:19 EET 2017


On Mon, Nov 27, 2017 at 12:36:48AM -0800, Steven Robertson wrote:
> Signed-off-by: Steven Robertson <steven at strobe.cc>
> ---
>  libavcodec/dnxhddec.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
> index f46e41a456..6f8c716412 100644
> --- a/libavcodec/dnxhddec.c
> +++ b/libavcodec/dnxhddec.c
> @@ -93,7 +93,9 @@ static av_cold int dnxhd_decode_init(AVCodecContext *avctx)
>  
>      ctx->avctx = avctx;
>      ctx->cid = -1;
> -    avctx->colorspace = AVCOL_SPC_BT709;
> +    if (avctx->colorspace == AVCOL_SPC_UNSPECIFIED) {
> +      avctx->colorspace = AVCOL_SPC_BT709;
> +    }

why is this sometimes but not always correct ?

can one and the same dnxhd stream be 2 different colorspace depending
on container or is the decoder implementation incomplete in relation
to setting the colorspace ?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171128/b598e95b/attachment.sig>


More information about the ffmpeg-devel mailing list