Message ID | 201608230942.34593.cehoyos@ag.or.at |
---|---|
State | Accepted |
Commit | 3c36d960f4a179fa52cdab419348b85945096ad3 |
Headers | show |
On Tue, Aug 23, 2016 at 09:42:34AM +0200, Carl Eugen Hoyos wrote: > Hi! > > Currently "Increasing reorder buffer" - that is important if the buffer is > increased mid-stream - is always shown, the patch tries to improve this. > > Please comment, Carl Eugen > h264dec.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > 4ea6e262434d750e8559d2a91178964f44f4fc6e 0001-lavc-h264dec-Improve-Increasing-reorder-buffer-messa.patch > From 9d7a230a6d13fa43e0e25b5c31c6c7f2703f217e Mon Sep 17 00:00:00 2001 > From: Carl Eugen Hoyos <cehoyos@ag.or.at> > Date: Tue, 23 Aug 2016 09:31:09 +0200 > Subject: [PATCH] lavc/h264dec: Improve "Increasing reorder buffer" message > loglevel. > > Do not show the message for the first frame by default, show a > warning if increasing is necessary in the middle of the stream. LGTM, thx [...]
Hi! 2016-08-23 12:46 GMT+02:00 Michael Niedermayer <michael@niedermayer.cc>: > On Tue, Aug 23, 2016 at 09:42:34AM +0200, Carl Eugen Hoyos wrote: >> Do not show the message for the first frame by default, show a >> warning if increasing is necessary in the middle of the stream. > > LGTM, thx Patch applied. Thank you, Carl Eugen
diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c index 9c37d46..ed0b724 100644 --- a/libavcodec/h264dec.c +++ b/libavcodec/h264dec.c @@ -528,7 +528,8 @@ static void decode_postinit(H264Context *h, int setup_finished) h->last_pocs[0] = cur->poc; cur->mmco_reset = 1; } else if(h->avctx->has_b_frames < out_of_order && !sps->bitstream_restriction_flag){ - av_log(h->avctx, AV_LOG_INFO, "Increasing reorder buffer to %d\n", out_of_order); + int loglevel = h->avctx->frame_number > 1 ? AV_LOG_WARNING : AV_LOG_VERBOSE; + av_log(h->avctx, loglevel, "Increasing reorder buffer to %d\n", out_of_order); h->avctx->has_b_frames = out_of_order; }
Hi! Currently "Increasing reorder buffer" - that is important if the buffer is increased mid-stream - is always shown, the patch tries to improve this. Please comment, Carl Eugen From 9d7a230a6d13fa43e0e25b5c31c6c7f2703f217e Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos <cehoyos@ag.or.at> Date: Tue, 23 Aug 2016 09:31:09 +0200 Subject: [PATCH] lavc/h264dec: Improve "Increasing reorder buffer" message loglevel. Do not show the message for the first frame by default, show a warning if increasing is necessary in the middle of the stream. --- libavcodec/h264dec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)