media_module: h264 playback crash [1/1]
authorPeng Yixin <yixin.peng@amlogic.com>
Wed, 27 Nov 2019 09:57:59 +0000 (17:57 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Sun, 1 Dec 2019 10:07:29 +0000 (03:07 -0700)
PD#SWPL-17322

Problem:
    h264 playback crash.

Solution:
    Determine wether file_vf is null

Verify:
    U212

Change-Id: I1643c43ef0eb55aa88beeb47b2f3c8c180b9a5a2
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
drivers/amlogic/media/video_processor/video_composer/video_composer.c

index 4ca7e141044b4c40152b1a3383b4de7eec2441eb..7520e317491db8c8027d6a851cc02da19ada5738 100644 (file)
@@ -1531,7 +1531,8 @@ static void vc_vf_put(struct vframe_s *vf, void *op_arg)
 
        if (!is_composer) {
                for (i = 0; i <= repeat_count; i++) {
-                       fput(file_vf);
+                       if (file_vf)
+                               fput(file_vf);
                        dev->fput_count++;
                }
        } else {