[FFmpeg-devel] [PATCH 1/4] h264: dont force a reinit on sample aspect ratio changes
Michael Niedermayer
michaelni at gmx.at
Mon Jul 16 20:17:32 CEST 2012
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
libavcodec/h264.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 0d32894..8a4d92c 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2439,7 +2439,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
|| 16*h->sps.mb_height * (2 - h->sps.frame_mbs_only_flag) != s->avctx->coded_height
|| s->avctx->bits_per_raw_sample != h->sps.bit_depth_luma
|| h->cur_chroma_format_idc != h->sps.chroma_format_idc
- || av_cmp_q(h->sps.sar, s->avctx->sample_aspect_ratio)));
+ ));
if(must_reinit && (h != h0 || (s->avctx->active_thread_type & FF_THREAD_FRAME))) {
av_log_missing_feature(s->avctx,
@@ -3857,6 +3857,9 @@ again:
(1 << h->sps.log2_max_frame_num);
}
+ hx->s.avctx->sample_aspect_ratio =
+ s->current_picture_ptr->f.sample_aspect_ratio = h->sps.sar;
+
s->current_picture_ptr->f.key_frame |=
(hx->nal_unit_type == NAL_IDR_SLICE);
--
1.7.9.5
More information about the ffmpeg-devel
mailing list