[vlc-commits] mediacodec: setup block callbacks from PaseVideoExtra

Thomas Guillem git at videolan.org
Wed Mar 29 15:49:45 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Mar 24 11:51:24 2017 +0100| [8ca8549c38ed9376534e579a21a66f70c91dff6e] | committer: Thomas Guillem

mediacodec: setup block callbacks from PaseVideoExtra

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8ca8549c38ed9376534e579a21a66f70c91dff6e
---

 modules/codec/omxil/mediacodec.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/modules/codec/omxil/mediacodec.c b/modules/codec/omxil/mediacodec.c
index 3f8e25d..d107bd3 100644
--- a/modules/codec/omxil/mediacodec.c
+++ b/modules/codec/omxil/mediacodec.c
@@ -284,6 +284,7 @@ static int ParseVideoExtraH264(decoder_t *p_dec, uint8_t *p_extra, int i_extra)
         return i_ret;
 
     assert(hh->pf_process_block != NULL);
+    p_sys->pf_on_new_block = VideoHXXX_OnNewBlock;
 
     if (hh->h264.i_sps_count > 0 || hh->h264.i_pps_count > 0)
         return H264SetCSD(p_dec, NULL);
@@ -300,6 +301,7 @@ static int ParseVideoExtraHEVC(decoder_t *p_dec, uint8_t *p_extra, int i_extra)
         return i_ret;
 
     assert(hh->pf_process_block != NULL);
+    p_sys->pf_on_new_block = VideoHXXX_OnNewBlock;
 
     if (hh->hevc.i_annexb_config_nal > 0)
         return HEVCSetCSD(p_dec, NULL);
@@ -326,6 +328,7 @@ static int ParseVideoExtraVc1(decoder_t *p_dec, uint8_t *p_extra, int i_extra)
     if (offset >= i_extra - 4)
         return VLC_EGENERIC;
 
+    p_dec->p_sys->pf_on_new_block = VideoVC1_OnNewBlock;
     return CSDDup(p_dec, p_extra + offset, i_extra - offset);
 }
 
@@ -359,6 +362,7 @@ static int ParseVideoExtraWmv3(decoder_t *p_dec, uint8_t *p_extra, int i_extra)
     SetDWLE(&(p_data[12]), p_dec->fmt_in.video.i_height);
     SetDWLE(&(p_data[16]), p_dec->fmt_in.video.i_width);
 
+    p_dec->p_sys->pf_on_new_block = VideoVC1_OnNewBlock;
     return CSDDup(p_dec, p_data, sizeof(p_data));
 }
 
@@ -633,17 +637,11 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init)
         {
         case VLC_CODEC_H264:
         case VLC_CODEC_HEVC:
-            p_sys->pf_on_new_block = VideoHXXX_OnNewBlock;
             hxxx_helper_init(&p_sys->video.hh, VLC_OBJECT(p_dec),
                              p_dec->fmt_in.i_codec, false);
             break;
-        case VLC_CODEC_VC1:
-            p_sys->pf_on_new_block = VideoVC1_OnNewBlock;
-            break;
-        default:
-            p_sys->pf_on_new_block = Video_OnNewBlock;
-            break;
         }
+        p_sys->pf_on_new_block = Video_OnNewBlock;
         p_sys->pf_on_flush = Video_OnFlush;
         p_sys->pf_process_output = Video_ProcessOutput;
 



More information about the vlc-commits mailing list