Am Sa., 12. Dez. 2020 um 10:57 Uhr schrieb Marton Balint <c...@passwd.hu>: > > On Fri, 11 Dec 2020, Carl Eugen Hoyos wrote: > > > Attached patch fixes ticket #9005. > > Why are the codec_tags set at all? Can't we simply remove setting of all > the codec tags in decklink? They hold no additional information to > codec id and pixel format. This should also fix the issue IMHO.
Alternative patch attached, completely untested. Carl Eugen
From 8eccc65c2602bcc884a3091bc6c69747faed8b85 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos <ceffm...@gmail.com> Date: Sun, 13 Dec 2020 11:01:02 +0100 Subject: [PATCH] lavd/decklink_dec: Do not set codec_tags. Only set the pix_fmt for rawvideo. Fixes ticket #9005. --- libavdevice/decklink_dec.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp index 6517b9df13..8d3fed253a 100644 --- a/libavdevice/decklink_dec.cpp +++ b/libavdevice/decklink_dec.cpp @@ -1280,34 +1280,26 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) switch(ctx->raw_format) { case bmdFormat8BitYUV: st->codecpar->codec_id = AV_CODEC_ID_RAWVIDEO; - st->codecpar->codec_tag = MKTAG('U', 'Y', 'V', 'Y'); st->codecpar->format = AV_PIX_FMT_UYVY422; st->codecpar->bit_rate = av_rescale(ctx->bmd_width * ctx->bmd_height * 16, st->time_base.den, st->time_base.num); break; case bmdFormat10BitYUV: st->codecpar->codec_id = AV_CODEC_ID_V210; - st->codecpar->codec_tag = MKTAG('V','2','1','0'); st->codecpar->bit_rate = av_rescale(ctx->bmd_width * ctx->bmd_height * 64, st->time_base.den, st->time_base.num * 3); - st->codecpar->bits_per_coded_sample = 10; break; case bmdFormat8BitARGB: st->codecpar->codec_id = AV_CODEC_ID_RAWVIDEO; st->codecpar->format = AV_PIX_FMT_0RGB; - st->codecpar->codec_tag = avcodec_pix_fmt_to_codec_tag((enum AVPixelFormat)st->codecpar->format); st->codecpar->bit_rate = av_rescale(ctx->bmd_width * ctx->bmd_height * 32, st->time_base.den, st->time_base.num); break; case bmdFormat8BitBGRA: st->codecpar->codec_id = AV_CODEC_ID_RAWVIDEO; st->codecpar->format = AV_PIX_FMT_BGR0; - st->codecpar->codec_tag = avcodec_pix_fmt_to_codec_tag((enum AVPixelFormat)st->codecpar->format); st->codecpar->bit_rate = av_rescale(ctx->bmd_width * ctx->bmd_height * 32, st->time_base.den, st->time_base.num); break; case bmdFormat10BitRGB: st->codecpar->codec_id = AV_CODEC_ID_R210; - st->codecpar->codec_tag = MKTAG('R','2','1','0'); - st->codecpar->format = AV_PIX_FMT_RGB48LE; st->codecpar->bit_rate = av_rescale(ctx->bmd_width * ctx->bmd_height * 30, st->time_base.den, st->time_base.num); - st->codecpar->bits_per_coded_sample = 10; break; default: char fourcc_str[AV_FOURCC_MAX_STRING_SIZE] = {0}; -- 2.29.2
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".