On Fri, 15 May 2020, Limin Wang wrote:

On Thu, May 14, 2020 at 11:03:49PM +0200, Marton Balint wrote:
This reverts commit 339593ca90cb3e05d659ec99a1479904ec742294.

Fixes null pointer dereference.


Signed-off-by: Marton Balint <c...@passwd.hu>
---
 libavfilter/vf_framerate.c | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/libavfilter/vf_framerate.c b/libavfilter/vf_framerate.c
index 8d16998457..6c8d01c94b 100644
--- a/libavfilter/vf_framerate.c
+++ b/libavfilter/vf_framerate.c
@@ -71,20 +71,13 @@ static double get_scene_score(AVFilterContext *ctx, AVFrame 
*crnt, AVFrame *next

     if (crnt->height == next->height &&
         crnt->width  == next->width) {
-        AVDictionaryEntry *e_mafd = NULL;
         uint64_t sad;
-        double mafd = HUGE_VAL, diff;
-        char *tail = NULL;
+        double mafd, diff;

         ff_dlog(ctx, "get_scene_score() process\n");
-        e_mafd = av_dict_get(next->metadata, "lavfi.scd.mafd", NULL, 
AV_DICT_MATCH_CASE);
-        if (e_mafd)
-            mafd = strtod(e_mafd->value, &tail);

just have time to look at the issue, I prefer to add one extra checking for 
!tail to fix
it, it's better than revert. I'll post patch for the fixes.

Applied the revert patches for now, because it seems there are other changes requested. Also the documentation should also mention that scene change detection depends on metadata.

Regards,
Marton
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to