From 5c67bc7dd3be7e2a0e71c4fe9dc6b871d354091d Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Wed, 20 Jun 2018 09:10:47 -0700 Subject: [PATCH] ffmpeg: fix currupt h.264 preview frames The ffmpeg developers added a "heuristic" to the h.264 recovery point code I wrote to prevent display of corrupt frames. The heuristic doesn't work very reliably, so I've disabled it. When I get a chance I'll see if I can come up with a better way to handle what the heuristic was added for. --- contrib/ffmpeg/A02-corrupt-h264-frames.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 contrib/ffmpeg/A02-corrupt-h264-frames.patch diff --git a/contrib/ffmpeg/A02-corrupt-h264-frames.patch b/contrib/ffmpeg/A02-corrupt-h264-frames.patch new file mode 100644 index 000000000..19ef5fd62 --- /dev/null +++ b/contrib/ffmpeg/A02-corrupt-h264-frames.patch @@ -0,0 +1,20 @@ +diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c +index 976044ce2c..0211d71a38 100644 +--- a/libavcodec/h264_refs.c ++++ b/libavcodec/h264_refs.c +@@ -812,6 +812,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h) + } + } + ++#if 0 + if ( err >= 0 + && h->long_ref_count==0 + && ( h->short_ref_count<=2 +@@ -822,6 +823,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h) + if(!h->avctx->has_b_frames) + h->frame_recovered |= FRAME_RECOVERED_SEI; + } ++#endif + + out: + return (h->avctx->err_recognition & AV_EF_EXPLODE) ? err : 0; -- 2.40.0