Commit 07a7f384 authored by Rainer Hochecker's avatar Rainer Hochecker Committed by Michael Niedermayer
Browse files

h264: avoid unnecessary calls to get_format

Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2197b4018920e5cd7ac465de007b675565687b23)
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
No related merge requests found
Showing with 2 additions and 1 deletion
+2 -1
......@@ -1438,7 +1438,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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment