summaryrefslogtreecommitdiff
path: root/libavdevice/decklink_dec.cpp
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2019-08-21 22:40:11 +0200
committerMarton Balint <cus@passwd.hu>2020-01-03 18:13:22 +0100
commit78a233e6e914d480d1c96ed6b5dcef2bd3c2695a (patch)
tree1f395afaf798a5986ae9ff4fe54007977ad26121 /libavdevice/decklink_dec.cpp
parentd111a41f9d5c23856ddba61f65e35f7ba534288f (diff)
downloadffmpeg-78a233e6e914d480d1c96ed6b5dcef2bd3c2695a.tar.gz
avdevice/decklink_dec: remove the @mode syntax
Deprecated since March 28, 2017. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavdevice/decklink_dec.cpp')
-rw-r--r--libavdevice/decklink_dec.cpp21
1 files changed, 5 insertions, 16 deletions
diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp
index ab7f28112e..19ea1eccad 100644
--- a/libavdevice/decklink_dec.cpp
+++ b/libavdevice/decklink_dec.cpp
@@ -1005,9 +1005,6 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
class decklink_input_callback *input_callback;
AVStream *st;
HRESULT result;
- char fname[1024];
- char *tmp;
- int mode_num = 0;
int ret;
ctx = (struct decklink_ctx *) av_mallocz(sizeof(struct decklink_ctx));
@@ -1062,15 +1059,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
cctx->raw_format = MKBETAG('v','2','1','0');
}
- av_strlcpy(fname, avctx->url, sizeof(fname));
- tmp=strchr (fname, '@');
- if (tmp != NULL) {
- av_log(avctx, AV_LOG_WARNING, "The @mode syntax is deprecated and will be removed. Please use the -format_code option.\n");
- mode_num = atoi (tmp+1);
- *tmp = 0;
- }
-
- ret = ff_decklink_init_device(avctx, fname);
+ ret = ff_decklink_init_device(avctx, avctx->url);
if (ret < 0)
return ret;
@@ -1111,7 +1100,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
goto error;
}
- if (mode_num == 0 && !cctx->format_code) {
+ if (!cctx->format_code) {
if (decklink_autodetect(cctx) < 0) {
av_log(avctx, AV_LOG_ERROR, "Cannot Autodetect input stream or No signal\n");
ret = AVERROR(EIO);
@@ -1119,9 +1108,9 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
}
av_log(avctx, AV_LOG_INFO, "Autodetected the input mode\n");
}
- if (ff_decklink_set_format(avctx, DIRECTION_IN, mode_num) < 0) {
- 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);
+ if (ff_decklink_set_format(avctx, DIRECTION_IN) < 0) {
+ av_log(avctx, AV_LOG_ERROR, "Could not set format code %s for %s\n",
+ cctx->format_code ? cctx->format_code : "(unset)", avctx->url);
ret = AVERROR(EIO);
goto error;
}