[FFmpeg-cvslog] h264: add avpriv_h264_has_num_reorder_frames()
Michael Niedermayer
git at videolan.org
Mon Jul 2 23:22:27 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jul 2 23:16:59 2012 +0200| [bafa1c7f383d6c1c0f3d207395fe6a574092b7ac] | committer: Michael Niedermayer
h264: add avpriv_h264_has_num_reorder_frames()
This function exports the exact sps.num_reorder_frames value
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bafa1c7f383d6c1c0f3d207395fe6a574092b7ac
---
libavcodec/h264.c | 6 ++++++
libavcodec/internal.h | 2 ++
2 files changed, 8 insertions(+)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 0c84018..0958c09 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -70,6 +70,12 @@ static const enum PixelFormat hwaccel_pixfmt_list_h264_jpeg_420[] = {
PIX_FMT_NONE
};
+int avpriv_h264_has_num_reorder_frames(AVCodecContext *avctx)
+{
+ H264Context *h = avctx->priv_data;
+ return h ? h->sps.num_reorder_frames : 0;
+}
+
/**
* Check if the top & left blocks are available if needed and
* change the dc mode so it only uses the available blocks.
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index 50f00ef..49c1a18 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -171,4 +171,6 @@ int ff_thread_can_start_frame(AVCodecContext *avctx);
int ff_get_logical_cpus(AVCodecContext *avctx);
+int avpriv_h264_has_num_reorder_frames(AVCodecContext *avctx);
+
#endif /* AVCODEC_INTERNAL_H */
More information about the ffmpeg-cvslog
mailing list