Only set the pix_fmt for rawvideo. Fixes ticket #9005.
Showing the changes to libavdevice/decklink_dec.cpp (1 of 1 file). Show all
Unified · Split
| @@ -1320,34 +1320,26 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) · 1319 unmodified lines | ||
| 1320 | 1320 | switch(ctx->raw_format) { |
| 1321 | 1321 | case bmdFormat8BitYUV: |
| 1322 | 1322 | st->codecpar->codec_id = AV_CODEC_ID_RAWVIDEO; |
| 1323 | − st->codecpar->codec_tag = MKTAG('U', 'Y', 'V', 'Y'); | |
| 1324 | 1323 | st->codecpar->format = AV_PIX_FMT_UYVY422; |
| 1325 | 1324 | st->codecpar->bit_rate = av_rescale(ctx->bmd_width * ctx->bmd_height * 16, st->time_base.den, st->time_base.num); |
| 1326 | 1325 | break; |
| 1327 | 1326 | case bmdFormat10BitYUV: |
| 1328 | 1327 | st->codecpar->codec_id = AV_CODEC_ID_V210; |
| 1329 | − st->codecpar->codec_tag = MKTAG('V','2','1','0'); | |
| 1330 | 1328 | st->codecpar->bit_rate = av_rescale(ctx->bmd_width * ctx->bmd_height * 64, st->time_base.den, st->time_base.num * 3); |
| 1331 | − st->codecpar->bits_per_coded_sample = 10; | |
| 1332 | 1329 | break; |
| 1333 | 1330 | case bmdFormat8BitARGB: |
| 1334 | 1331 | st->codecpar->codec_id = AV_CODEC_ID_RAWVIDEO; |
| 1335 | 1332 | st->codecpar->format = AV_PIX_FMT_0RGB; |
| 1336 | − st->codecpar->codec_tag = avcodec_pix_fmt_to_codec_tag((enum AVPixelFormat)st->codecpar->format); | |
| 1337 | 1333 | st->codecpar->bit_rate = av_rescale(ctx->bmd_width * ctx->bmd_height * 32, st->time_base.den, st->time_base.num); |
| 1338 | 1334 | break; |
| 1339 | 1335 | case bmdFormat8BitBGRA: |
| 1340 | 1336 | st->codecpar->codec_id = AV_CODEC_ID_RAWVIDEO; |
| 1341 | 1337 | st->codecpar->format = AV_PIX_FMT_BGR0; |
| 1342 | − st->codecpar->codec_tag = avcodec_pix_fmt_to_codec_tag((enum AVPixelFormat)st->codecpar->format); | |
| 1343 | 1338 | st->codecpar->bit_rate = av_rescale(ctx->bmd_width * ctx->bmd_height * 32, st->time_base.den, st->time_base.num); |
| 1344 | 1339 | break; |
| 1345 | 1340 | case bmdFormat10BitRGB: |
| 1346 | 1341 | st->codecpar->codec_id = AV_CODEC_ID_R210; |
| 1347 | − st->codecpar->codec_tag = MKTAG('R','2','1','0'); | |
| 1348 | − st->codecpar->format = AV_PIX_FMT_RGB48LE; | |
| 1349 | 1342 | st->codecpar->bit_rate = av_rescale(ctx->bmd_width * ctx->bmd_height * 30, st->time_base.den, st->time_base.num); |
| 1350 | − st->codecpar->bits_per_coded_sample = 10; | |
| 1351 | 1343 | break; |
| 1352 | 1344 | default: |
| 1353 | 1345 | char fourcc_str[AV_FOURCC_MAX_STRING_SIZE] = {0}; |