mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-15 21:32:12 +08:00
avdevice/decklink: new option 'format_code' to set video format by fourCC
Signed-off-by: Matthias Hunstock <atze@fem.tu-ilmenau.de> Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:

committed by
Marton Balint

parent
607bffbed2
commit
b3a2adaac6
@@ -539,9 +539,10 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (mode_num > 0) {
|
||||
if (mode_num > 0 || cctx->format_code) {
|
||||
if (ff_decklink_set_format(avctx, DIRECTION_IN, mode_num) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Could not set mode %d for %s\n", mode_num, fname);
|
||||
av_log(avctx, AV_LOG_ERROR, "Could not set mode number %d or format code %s for %s\n",
|
||||
mode_num, (cctx->format_code) ? cctx->format_code : "(unset)", fname);
|
||||
ret = AVERROR(EIO);
|
||||
goto error;
|
||||
}
|
||||
|
Reference in New Issue
Block a user