mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
avdevice/decklink_dec: remove the @mode syntax
Deprecated since March 28, 2017. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user