summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index bc79f66b8e..34261a2f38 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -4155,6 +4155,18 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
return 0;
}
+int ff_h264_get_slice_type(H264Context *h)
+{
+ switch (h->slice_type) {
+ case FF_P_TYPE: return 0;
+ case FF_B_TYPE: return 1;
+ case FF_I_TYPE: return 2;
+ case FF_SP_TYPE: return 3;
+ case FF_SI_TYPE: return 4;
+ default: return -1;
+ }
+}
+
/**
*
*/