On 08.08.2015 18:01, Hendrik Leppkes wrote: > On Sat, Aug 8, 2015 at 5:55 PM, Michael Niedermayer > <mich...@niedermayer.cc> wrote: >> On Sat, Aug 08, 2015 at 01:32:56PM +0200, Andreas Cadhalpun wrote: >> iam not objecting to the change but >> wouldnt it make sense for ffmpeg/ffplay/ffserver and other tools >> to be able to ask for a sample ? >> >> also we are searching for a sample that has rotation angles which are >> not i*90deg. Our code does potentially not handle these optimally but >> I dont know maybe we do handle it fine, i would need a real world >> sample to see what such angle is used for / when it is used to know >> what is the best thing to do in such case .. >> > > As this is only two small cases, maybe should just put the request > text in these av_logs instead.
Patch doing that attached. Best regards, Andreas
>From 5b105fc8013e7fbdc9299418e90547dd2aab5023 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> Date: Sat, 8 Aug 2015 10:41:32 +0200 Subject: [PATCH 10/13] ffmpeg: replace deprecated av_log_ask_for_sample with av_log Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> --- cmdutils.c | 5 ++++- ffmpeg.c | 13 +++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/cmdutils.c b/cmdutils.c index 78b0094..b696008 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -2040,7 +2040,10 @@ double get_rotation(AVStream *st) theta -= 360*floor(theta/360 + 0.9/360); if (fabs(theta - 90*round(theta/90)) > 2) - av_log_ask_for_sample(NULL, "Odd rotation angle\n"); + av_log(NULL, AV_LOG_WARNING, "Odd rotation angle.\n" + "If you want to help, upload a sample " + "of this file to ftp://upload.ffmpeg.org/incoming/ " + "and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)"); return theta; } diff --git a/ffmpeg.c b/ffmpeg.c index 4e04455..a9f8b6a 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -2069,12 +2069,13 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output) if (ist->dec_ctx->codec_id == AV_CODEC_ID_H264) { ist->st->codec->has_b_frames = ist->dec_ctx->has_b_frames; } else - av_log_ask_for_sample( - ist->dec_ctx, - "has_b_frames is larger in decoder than demuxer %d > %d ", - ist->dec_ctx->has_b_frames, - ist->st->codec->has_b_frames - ); + av_log(ist->dec_ctx, AV_LOG_WARNING, + "has_b_frames is larger in decoder than demuxer %d > %d.\n" + "If you want to help, upload a sample " + "of this file to ftp://upload.ffmpeg.org/incoming/ " + "and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)", + ist->dec_ctx->has_b_frames, + ist->st->codec->has_b_frames); } if (*got_output || ret<0) -- 2.5.0
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel