diff options
author | Rainer Hochecker <fernetmenta@online.de> | 2015-03-31 08:27:01 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-31 12:14:39 +0200 |
commit | 8b152c355f6c52ddf5b5b1c6a90bcfb8468fe8d3 (patch) | |
tree | f1af7c9e4a01ec219d0eab4db72b0bbbaa86a50f | |
parent | 0c9abf211931b1a5e3b5d1ebfac3d2214103ae2f (diff) | |
download | ffmpeg-8b152c355f6c52ddf5b5b1c6a90bcfb8468fe8d3.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 dfb44ac4f3..c10568a4ed 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -1325,7 +1325,8 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl) || 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(h->avctx->pix_fmt) != non_j_pixfmt(get_pixel_format(h, 0))) + if (h->avctx->pix_fmt == AV_PIX_FMT_NONE + || (non_j_pixfmt(h->avctx->pix_fmt) != non_j_pixfmt(get_pixel_format(h, 0)))) must_reinit = 1; if (first_slice && av_cmp_q(h->sps.sar, h->avctx->sample_aspect_ratio)) |