Commit afa6e6a2 authored by François Grisez's avatar François Grisez
Browse files

Implement MS_VIDEO_DECODER_FREEZE_ON_ERROR in MSMediaCodecH264Dec

parent 58057e72
...@@ -453,14 +453,22 @@ static int dec_enable_avpf(MSFilter *f, void *data) { ...@@ -453,14 +453,22 @@ static int dec_enable_avpf(MSFilter *f, void *data) {
return 0; return 0;
} }
static int dec_freeze_on_error(MSFilter *f, void *enable) {
DecData *s = (DecData *)f->data;
s->freeze_on_error = *(bool_t *)enable;
ms_message("MSMediaCodecH264Dec: freeze on error %s", s->freeze_on_error ? "enabled" : "disabled");
return 0;
}
static MSFilterMethod mediacodec_h264_dec_methods[]={ static MSFilterMethod mediacodec_h264_dec_methods[]={
{ MS_FILTER_ADD_FMTP , dec_add_fmtp }, { MS_FILTER_ADD_FMTP , dec_add_fmtp },
{ MS_VIDEO_DECODER_RESET_FIRST_IMAGE_NOTIFICATION , reset_first_image }, { MS_VIDEO_DECODER_RESET_FIRST_IMAGE_NOTIFICATION , reset_first_image },
{ MS_FILTER_GET_VIDEO_SIZE , dec_get_vsize }, { MS_FILTER_GET_VIDEO_SIZE , dec_get_vsize },
{ MS_FILTER_GET_FPS , dec_get_fps }, { MS_FILTER_GET_FPS , dec_get_fps },
{ MS_FILTER_GET_OUTPUT_FMT , dec_get_outfmt }, { MS_FILTER_GET_OUTPUT_FMT , dec_get_outfmt },
{ MS_VIDEO_DECODER_ENABLE_AVPF , dec_enable_avpf }, { MS_VIDEO_DECODER_ENABLE_AVPF , dec_enable_avpf },
{ 0 , NULL } { MS_VIDEO_DECODER_FREEZE_ON_ERROR , dec_freeze_on_error },
{ 0 , NULL }
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment