[FFmpeg-cvslog] ffmpeg: replace deprecated av_log_ask_for_sample with av_log

Andreas Cadhalpun git at videolan.org
Wed Aug 12 00:15:15 CEST 2015


ffmpeg | branch: master | Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com> | Sat Aug  8 10:41:32 2015 +0200| [9c29aa7143ba13ba71c70a1454ec35f2da10c3e0] | committer: Andreas Cadhalpun

ffmpeg: replace deprecated av_log_ask_for_sample with av_log

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9c29aa7143ba13ba71c70a1454ec35f2da10c3e0
---

 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 at ffmpeg.org)");
 
     return theta;
 }
diff --git a/ffmpeg.c b/ffmpeg.c
index 9dcd641..f766830 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2063,12 +2063,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 at ffmpeg.org)",
+                   ist->dec_ctx->has_b_frames,
+                   ist->st->codec->has_b_frames);
     }
 
     if (*got_output || ret<0)



More information about the ffmpeg-cvslog mailing list