[FFmpeg-devel] [PATCH] h264: avoid unnecessary calls to get_format

2015-03-31 Thread Rainer Hochecker
---
 libavcodec/h264_slice.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 80d27e5..9477650 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1417,7 +1417,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))
-- 
2.1.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] h264: avoid unnecessary calls to get_format

2015-03-31 Thread Michael Niedermayer
On Tue, Mar 31, 2015 at 08:27:01AM +0200, Rainer Hochecker wrote:
 ---
  libavcodec/h264_slice.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

applied

thanks

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 2
100% positive feedback - All either got their money back or didnt complain
Best seller ever, very honest - Seller refunded buyer after failed scam


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel