[vlc-commits] decoder: rename confusing frame drop member

Francois Cartegnie git at videolan.org
Sat Jul 4 13:50:03 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Jul  4 13:12:06 2015 +0200| [8e51b8da4c78a69d47c20b8b8e214da39be013f9] | committer: Francois Cartegnie

decoder: rename confusing frame drop member

not related to the other pace controls

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

 include/vlc_codec.h                      |    2 +-
 modules/codec/avcodec/video.c            |    4 ++--
 modules/codec/libmpeg2.c                 |    2 +-
 modules/stream_out/mosaic_bridge.c       |    2 +-
 modules/stream_out/transcode/transcode.c |    2 +-
 src/input/decoder.c                      |    1 +
 src/misc/image.c                         |    2 +-
 7 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/include/vlc_codec.h b/include/vlc_codec.h
index 6d385b4..0c43978 100644
--- a/include/vlc_codec.h
+++ b/include/vlc_codec.h
@@ -66,7 +66,7 @@ struct decoder_t
     bool                b_need_packetized;
 
     /* Tell the decoder if it is allowed to drop frames */
-    bool                b_pace_control;
+    bool                b_frame_drop_allowed;
 
     /* */
     picture_t *         ( * pf_decode_video )( decoder_t *, block_t ** );
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index dbf5a16..c84ecb9 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -547,7 +547,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
         }
     }
 
-    if( !p_dec->b_pace_control && (p_sys->i_late_frames > 0) &&
+    if( p_dec->b_frame_drop_allowed && (p_sys->i_late_frames > 0) &&
         (mdate() - p_sys->i_late_frames_start > INT64_C(5000000)) )
     {
         if( p_sys->i_pts > VLC_TS_INVALID )
@@ -563,7 +563,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
     }
 
     /* A good idea could be to decode all I pictures and see for the other */
-    if( !p_dec->b_pace_control &&
+    if( p_dec->b_frame_drop_allowed &&
         p_sys->b_hurry_up &&
         (p_sys->i_late_frames > 4) )
     {
diff --git a/modules/codec/libmpeg2.c b/modules/codec/libmpeg2.c
index c8e1c49..ff5a56e 100644
--- a/modules/codec/libmpeg2.c
+++ b/modules/codec/libmpeg2.c
@@ -388,7 +388,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
 
             picture_t *p_pic;
 
-            if( !p_dec->b_pace_control && !p_sys->b_preroll &&
+            if( p_dec->b_frame_drop_allowed && !p_sys->b_preroll &&
                 !(p_sys->b_slice_i
                    && ((p_current->flags
                          & PIC_MASK_CODING_TYPE) == PIC_FLAG_CODING_TYPE_P))
diff --git a/modules/stream_out/mosaic_bridge.c b/modules/stream_out/mosaic_bridge.c
index 825de38..5853814 100644
--- a/modules/stream_out/mosaic_bridge.c
+++ b/modules/stream_out/mosaic_bridge.c
@@ -286,7 +286,7 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, const es_format_t *p
         return NULL;
     p_sys->p_decoder->p_module = NULL;
     p_sys->p_decoder->fmt_in = *p_fmt;
-    p_sys->p_decoder->b_pace_control = false;
+    p_sys->p_decoder->b_frame_drop_allowed = true;
     p_sys->p_decoder->fmt_out = p_sys->p_decoder->fmt_in;
     p_sys->p_decoder->fmt_out.i_extra = 0;
     p_sys->p_decoder->fmt_out.p_extra = 0;
diff --git a/modules/stream_out/transcode/transcode.c b/modules/stream_out/transcode/transcode.c
index 35de5a8..ef7bd44 100644
--- a/modules/stream_out/transcode/transcode.c
+++ b/modules/stream_out/transcode/transcode.c
@@ -518,7 +518,7 @@ static sout_stream_id_sys_t *Add( sout_stream_t *p_stream,
         goto error;
     id->p_decoder->p_module = NULL;
     id->p_decoder->fmt_in = *p_fmt;
-    id->p_decoder->b_pace_control = true;
+    id->p_decoder->b_frame_drop_allowed = false;
 
     /* Create encoder object */
     id->p_encoder = sout_EncoderCreate( p_stream );
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 0b86578..68d8e7c 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1476,6 +1476,7 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,
     if( p_dec == NULL )
         return NULL;
 
+    p_dec->b_frame_drop_allowed = true;
     p_dec->pf_decode_audio = NULL;
     p_dec->pf_decode_video = NULL;
     p_dec->pf_decode_sub = NULL;
diff --git a/src/misc/image.c b/src/misc/image.c
index e8c2e08..15c3c09 100644
--- a/src/misc/image.c
+++ b/src/misc/image.c
@@ -610,7 +610,7 @@ static decoder_t *CreateDecoder( vlc_object_t *p_this, video_format_t *fmt )
     es_format_Init( &p_dec->fmt_in, VIDEO_ES, fmt->i_chroma );
     es_format_Init( &p_dec->fmt_out, VIDEO_ES, 0 );
     p_dec->fmt_in.video = *fmt;
-    p_dec->b_pace_control = true;
+    p_dec->b_frame_drop_allowed = false;
 
     p_dec->pf_vout_format_update = video_update_format;
     p_dec->pf_vout_buffer_new = video_new_buffer;



More information about the vlc-commits mailing list