diff options
author | Rainer Hochecker <fernetmenta@online.de> | 2015-03-31 08:27:01 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-11 22:01:46 +0200 |
commit | 7689fe5cfd28b2937f7a3497ed49a3d70de075e0 (patch) | |
tree | f516446988d026f137a22089a303f360abf9f9f4 | |
parent | f597b9f04e69aea9022c01944225f4c97964f86f (diff) | |
download | ffmpeg-7689fe5cfd28b2937f7a3497ed49a3d70de075e0.tar.gz |
h264: avoid unnecessary calls to get_format
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/h264_slice.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index e9a89d11f7..0071e6e3dc 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -1416,7 +1416,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)) |