|
|
@@ -702,9 +702,12 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx) |
|
|
|
|
|
|
|
|
ff_h264_flush_change(h); |
|
|
ff_h264_flush_change(h); |
|
|
|
|
|
|
|
|
|
|
|
if (h->enable_er < 0 && (avctx->active_thread_type & FF_THREAD_SLICE)) |
|
|
|
|
|
h->enable_er = 0; |
|
|
|
|
|
|
|
|
if (h->enable_er) { |
|
|
if (h->enable_er) { |
|
|
av_log(avctx, AV_LOG_WARNING, |
|
|
av_log(avctx, AV_LOG_WARNING, |
|
|
"Error resilience is enabled. It is unsafe and unsupported and may crash. " |
|
|
|
|
|
|
|
|
"Error resilience with slice threads is enabled. It is unsafe and unsupported and may crash. " |
|
|
"Use it at your own risk\n"); |
|
|
"Use it at your own risk\n"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@@ -1936,7 +1939,7 @@ static av_cold int h264_decode_end(AVCodecContext *avctx) |
|
|
static const AVOption h264_options[] = { |
|
|
static const AVOption h264_options[] = { |
|
|
{"is_avc", "is avc", offsetof(H264Context, is_avc), FF_OPT_TYPE_INT, {.i64 = 0}, 0, 1, 0}, |
|
|
{"is_avc", "is avc", offsetof(H264Context, is_avc), FF_OPT_TYPE_INT, {.i64 = 0}, 0, 1, 0}, |
|
|
{"nal_length_size", "nal_length_size", offsetof(H264Context, nal_length_size), FF_OPT_TYPE_INT, {.i64 = 0}, 0, 4, 0}, |
|
|
{"nal_length_size", "nal_length_size", offsetof(H264Context, nal_length_size), FF_OPT_TYPE_INT, {.i64 = 0}, 0, 4, 0}, |
|
|
{ "enable_er", "Enable error resilience on damaged frames (unsafe)", OFFSET(enable_er), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VD }, |
|
|
|
|
|
|
|
|
{ "enable_er", "Enable error resilience on damaged frames (unsafe)", OFFSET(enable_er), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VD }, |
|
|
{ NULL }, |
|
|
{ NULL }, |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|