diff options
author | Laurent Aimar <fenrir@via.ecp.fr> | 2010-01-09 16:20:41 +0000 |
---|---|---|
committer | Ramiro Polla <ramiro.polla@gmail.com> | 2010-01-09 16:20:41 +0000 |
commit | 75dd693840e64ce3d9db7e93bbe3a87b47c4c787 (patch) | |
tree | 5da82dbc4f34d6838f281e163e76b4de6b4030a5 /libavcodec/h264.c | |
parent | fc53b6afee7cdf1b9125d2c5a43f3fe879d85f24 (diff) | |
download | ffmpeg-75dd693840e64ce3d9db7e93bbe3a87b47c4c787.tar.gz |
Export get_slice_type() as ff_h264_get_slice_type().
Patch by Laurent Aimar <fenrir at videolan dot org>.
Originally committed as revision 21110 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 12 |
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; + } +} + /** * */ |