aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Hochecker <fernetmenta@online.de>2015-03-31 08:27:01 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-17 15:20:29 +0200
commit071eb56a6a50c49c2341f3d2c69367fc5074f089 (patch)
treeac2ca88a616dc1e74fc09bc181a9405430652741
parent2f67222780be4412a4b1f896a3c32ca75dac0717 (diff)
downloadffmpeg-071eb56a6a50c49c2341f3d2c69367fc5074f089.tar.gz
h264: avoid unnecessary calls to get_format
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 2197b4018920e5cd7ac465de007b675565687b23) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/h264_slice.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index d08dd1511c..24bef59d7c 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1434,7 +1434,8 @@ int ff_h264_decode_slice_header(H264Context *h, H264Context *h0)
|| h->mb_width != h->sps.mb_width
|| h->mb_height != h->sps.mb_height * (2 - h->sps.frame_mbs_only_flag)
));
- if (non_j_pixfmt(h0->avctx->pix_fmt) != non_j_pixfmt(get_pixel_format(h0, 0)))
+ if (h0->avctx->pix_fmt == AV_PIX_FMT_NONE
+ || (non_j_pixfmt(h0->avctx->pix_fmt) != non_j_pixfmt(get_pixel_format(h0, 0))))
must_reinit = 1;
if (first_slice && av_cmp_q(h->sps.sar, h->avctx->sample_aspect_ratio))