On Tue, Sep 23, 2014 at 07:45:56AM +0200, Clément Bœsch wrote:
> On Tue, Sep 23, 2014 at 03:21:30AM +0200, Michael Niedermayer wrote:
> > This fixes the case where muxing fails hard in case of stream copying 
> > damaged input
> > 
> > Signed-off-by: Michael Niedermayer <michae...@gmx.at>
> > ---
> >  ffmpeg.c |    8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git a/ffmpeg.c b/ffmpeg.c
> > index 47a4144..5492cfe 100644
> > --- a/ffmpeg.c
> > +++ b/ffmpeg.c
> > @@ -670,6 +670,14 @@ static void write_frame(AVFormatContext *s, AVPacket 
> > *pkt, OutputStream *ost)
> >                       - FFMIN3(pkt->pts, pkt->dts, ost->last_mux_dts + 1)
> >                       - FFMAX3(pkt->pts, pkt->dts, ost->last_mux_dts + 1);
> >          }
> > +        if (pkt->dts != AV_NOPTS_VALUE &&
> > +            pkt->pts == AV_NOPTS_VALUE &&
> > +            !(s->oformat->flags & AVFMT_TS_NONSTRICT)) { //FIXME use a 
> > AVFMT_TS_NEEDS_PTS
> > +            av_log(s, AV_LOG_WARNING, "PTS unknown, using DTS: %"PRId64" 
> > in output stream %d:%d\n",
> > +                   pkt->dts,
> > +                   ost->file_index, ost->st->index);
> > +            pkt->pts = pkt->dts;
> > +        }
> 
> why not abort with a AVERROR_BUG or something so we get report of such
> cases?
> 

Oh I'm sorry, I misread the patch, I thought it was about buggy muxers;
ignore my comment

-- 
Clément B.

Attachment: pgpAWYii5nWuZ.pgp
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to