Browse code

h264: add avpriv_h264_has_num_reorder_frames()

This function exports the exact sps.num_reorder_frames value

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2012/07/03 06:16:59
Showing 2 changed files
... ...
@@ -70,6 +70,12 @@ static const enum PixelFormat hwaccel_pixfmt_list_h264_jpeg_420[] = {
70 70
     PIX_FMT_NONE
71 71
 };
72 72
 
73
+int avpriv_h264_has_num_reorder_frames(AVCodecContext *avctx)
74
+{
75
+    H264Context *h = avctx->priv_data;
76
+    return h ? h->sps.num_reorder_frames : 0;
77
+}
78
+
73 79
 /**
74 80
  * Check if the top & left blocks are available if needed and
75 81
  * change the dc mode so it only uses the available blocks.
... ...
@@ -171,4 +171,6 @@ int ff_thread_can_start_frame(AVCodecContext *avctx);
171 171
 
172 172
 int ff_get_logical_cpus(AVCodecContext *avctx);
173 173
 
174
+int avpriv_h264_has_num_reorder_frames(AVCodecContext *avctx);
175
+
174 176
 #endif /* AVCODEC_INTERNAL_H */