[FFmpeg-devel] [PATCH 10/13] ffmpeg: replace deprecated av_log_ask_for_sample with av_log

Michael Niedermayer michael at niedermayer.cc
Sat Aug 8 17:55:17 CEST 2015


On Sat, Aug 08, 2015 at 01:32:56PM +0200, Andreas Cadhalpun wrote:
> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
> ---
>  cmdutils.c |  2 +-
>  ffmpeg.c   | 10 ++++------
>  2 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/cmdutils.c b/cmdutils.c
> index 9bbd54b..ff5e833 100644
> --- a/cmdutils.c
> +++ b/cmdutils.c
> @@ -2048,7 +2048,7 @@ 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");
>  
>      return theta;
>  }
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 6937a00..5c44ad2 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -2069,12 +2069,10 @@ 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",
> +                   ist->dec_ctx->has_b_frames,
> +                   ist->st->codec->has_b_frames);

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 ..

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

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150808/6089eff1/attachment.sig>


More information about the ffmpeg-devel mailing list