[vlc-commits] hevc_nal: add hevc_get_slice_type
Francois Cartegnie
git at videolan.org
Tue Dec 15 20:12:12 CET 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Dec 15 20:11:05 2015 +0100| [aecc7e86a07ed2fbc11f2aceff160d7bc4098465] | committer: Francois Cartegnie
hevc_nal: add hevc_get_slice_type
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=aecc7e86a07ed2fbc11f2aceff160d7bc4098465
---
modules/packetizer/hevc_nal.c | 10 ++++++++++
modules/packetizer/hevc_nal.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/modules/packetizer/hevc_nal.c b/modules/packetizer/hevc_nal.c
index 7dde27e..e5cf7f5 100644
--- a/modules/packetizer/hevc_nal.c
+++ b/modules/packetizer/hevc_nal.c
@@ -1141,3 +1141,13 @@ hevc_slice_segment_header_t * hevc_rbsp_decode_slice_header( const uint8_t *p_bu
}
return p_sh;
}
+
+bool hevc_get_slice_type( const hevc_slice_segment_header_t *p_sli, enum hevc_slice_type_e *pi_type )
+{
+ if( !p_sli->dependent_slice_segment_flag )
+ {
+ *pi_type = p_sli->slice_type;
+ return true;
+ }
+ return false;
+}
diff --git a/modules/packetizer/hevc_nal.h b/modules/packetizer/hevc_nal.h
index 68fa3ce..a3c256b 100644
--- a/modules/packetizer/hevc_nal.h
+++ b/modules/packetizer/hevc_nal.h
@@ -163,5 +163,6 @@ bool hevc_get_picture_size( const hevc_sequence_parameter_set_t *, unsigned *p_w
bool hevc_get_frame_rate( const hevc_sequence_parameter_set_t *,
const hevc_video_parameter_set_t ** /* HEVC_MAX_VPS || NULL */,
unsigned *pi_num, unsigned *pi_den );
+bool hevc_get_slice_type( const hevc_slice_segment_header_t *, enum hevc_slice_type_e * );
#endif /* HEVC_NAL_H */
More information about the vlc-commits
mailing list