---
avconv.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/avconv.c b/avconv.c
index 2246851..7d30b99 100644
--- a/avconv.c
+++ b/avconv.c
@@ -295,6 +295,7 @@ typedef struct OptionsContext {
/* input options */
int64_t input_ts_offset;
int rate_emu;
+ const char *err_recognition;
SpecifierOpt *ts_scale;
int nb_ts_scale;
@@ -3128,6 +3129,9 @@ static void add_input_streams(OptionsContext *o,
AVFormatContext *ic)
ist->ts_scale = 1.0;
MATCH_PER_STREAM_OPT(ts_scale, dbl, ist->ts_scale, ic, st);
+ if (o->err_recognition)
+ av_dict_set(&ist->opts, "c_err_detect", o->err_recognition, 0);
+
ist->dec = choose_decoder(o, ic, st);
switch (dec->codec_type) {
@@ -3261,6 +3265,8 @@ static int opt_input_file(OptionsContext *o, const char
*opt, const char *filena
}
if (o->nb_frame_pix_fmts)
av_dict_set(&format_opts, "pixel_format",
o->frame_pix_fmts[o->nb_frame_pix_fmts - 1].u.str, 0);
+ if (o->err_recognition)
+ av_dict_set(&format_opts, "f_err_detect", o->err_recognition, 0);
ic->flags |= AVFMT_FLAG_NONBLOCK;
ic->interrupt_callback = int_cb;
@@ -4386,6 +4392,7 @@ static const OptionDef options[] = {
{ "copytb", OPT_BOOL | OPT_EXPERT, {(void*)©_tb}, "copy input stream
time base when stream copying" },
{ "shortest", OPT_BOOL | OPT_EXPERT, {(void*)&opt_shortest}, "finish
encoding within shortest input" }, //
{ "dts_delta_threshold", HAS_ARG | OPT_FLOAT | OPT_EXPERT,
{(void*)&dts_delta_threshold}, "timestamp discontinuity delta threshold",
"threshold" },
+ { "err_detect", HAS_ARG | OPT_STRING | OPT_OFFSET, {.off =
OFFSET(err_recognition)}, "set error detection for lavf and lavc", "flags" },
{ "xerror", OPT_BOOL, {(void*)&exit_on_error}, "exit on error", "error" },
{ "copyinkf", OPT_BOOL | OPT_EXPERT | OPT_SPEC, {.off =
OFFSET(copy_initial_nonkeyframes)}, "copy initial non-keyframes" },
{ "frames", OPT_INT64 | HAS_ARG | OPT_SPEC, {.off = OFFSET(max_frames)},
"set the number of frames to record", "number" },
--
1.7.2.5
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel