diff h264.c @ 10829:46a247e54d6e libavcodec

Export get_slice_type() as ff_h264_get_slice_type(). Patch by Laurent Aimar <fenrir at videolan dot org>.
author ramiro
date Sat, 09 Jan 2010 16:20:41 +0000
parents 59c35482189e
children e5905bfa625d
line wrap: on
line diff
--- a/h264.c	Sat Jan 09 14:59:06 2010 +0000
+++ b/h264.c	Sat Jan 09 16:20:41 2010 +0000
@@ -4155,6 +4155,18 @@
     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;
+    }
+}
+
 /**
  *
  */