[FFmpeg-devel] [PATCH] Make mpeg4 encoder log a more explicit error message when the timebase is not valid.

Stefano Sabatini stefano.sabatini-lala
Wed Jan 5 12:35:39 CET 2011


On date Wednesday 2011-01-05 05:55:30 +0100, Michael Niedermayer encoded:
> On Tue, Jan 04, 2011 at 07:50:22PM +0100, Stefano Sabatini wrote:
> > On date Tuesday 2011-01-04 13:27:29 -0500, Jason Garrett-Glaser encoded:
> > > On Tue, Jan 4, 2011 at 1:16 PM, Stefano Sabatini
> > > <stefano.sabatini-lala at poste.it> wrote:
> > > > ---
> > > > ?libavcodec/mpegvideo_enc.c | ? ?3 ++-
> > > > ?1 files changed, 2 insertions(+), 1 deletions(-)
> > > >
> > > > diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
> > > > index 459ede7..81f9acb 100644
> > > > --- a/libavcodec/mpegvideo_enc.c
> > > > +++ b/libavcodec/mpegvideo_enc.c
> > > > @@ -519,7 +519,8 @@ av_cold int MPV_encode_init(AVCodecContext *avctx)
> > > > ? ? avcodec_get_chroma_sub_sample(avctx->pix_fmt, &chroma_h_shift, &chroma_v_shift);
> > > >
> > > > ? ? if(avctx->codec_id == CODEC_ID_MPEG4 && s->avctx->time_base.den > (1<<16)-1){
> > > > - ? ? ? ?av_log(avctx, AV_LOG_ERROR, "timebase not supported by mpeg 4 standard\n");
> > > > + ? ? ? ?av_log(avctx, AV_LOG_ERROR, "timebase %d/%d not supported by MPEG 4 standard\n",
> > > > + ? ? ? ? ? ? ? s->avctx->time_base.num, s->avctx->time_base.den);
> > > > ? ? ? ? return -1;
> > > > ? ? }
> > > > ? ? s->time_increment_bits = av_log2(s->avctx->time_base.den - 1) + 1;
> > > > --
> > > > 1.7.2.3
> > > >
> > > > _______________________________________________
> > > > ffmpeg-devel mailing list
> > > > ffmpeg-devel at mplayerhq.hu
> > > > https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
> > > >
> > > 
> > > Why not add something about what the max timebase is to the error message?
> > 
> > Updated.
> > -- 
> > FFmpeg = Freak Fiendish Moronic Philosofic Ecumenical Ghost
> 
> >  mpegvideo_enc.c |    4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 713c017cf191e988a8d1199b4c14f24c9b2f00af  0001-Make-mpeg4-encoder-log-a-more-explicit-error-message.patch
> > From 5a689e85faa679120832941992550ae9280ef383 Mon Sep 17 00:00:00 2001
> > From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> > Date: Tue, 4 Jan 2011 18:30:40 +0100
> > Subject: [PATCH] Make mpeg4 encoder log a more explicit error message when the timebase
> >  is not valid.
> 
> lgtm

Applied.
-- 
FFmpeg = Formidable Fiendish Magical Practical Easy Gangster



More information about the ffmpeg-devel mailing list