[FFmpeg-devel] Patch for "non monotone timestamp" error
Diep Ho
DHo
Mon Aug 4 15:14:44 CEST 2008
> -----Original Message-----
> From: ffmpeg-devel-bounces at mplayerhq.hu [mailto:ffmpeg-devel-
> bounces at mplayerhq.hu] On Behalf Of Michael Niedermayer
> Sent: vendredi 1 ao?t 2008 19:19
> To: FFmpeg development discussions and patches
> Subject: Re: [FFmpeg-devel] Patch for "non monotone timestamp" error
>
> On Fri, Aug 01, 2008 at 05:47:44PM +0200, Diep Ho wrote:
> > > -----Original Message-----
> > > From: ffmpeg-devel-bounces at mplayerhq.hu [mailto:ffmpeg-devel-
>
> there is no such thing as low delay mpeg1, low delay was added in
> mpeg2.
We added it to encode mpeg1 videos without b-frames. It turns out that ffmpeg can not decode those videos since it cannot know whether they have b-frames (low_delay) or not.
There is no way to force the command ffmpeg to read a file in the mode low_delay.
I ve made a patch trying to offer an option to programs using the library FFMPEG to force the low_delay. At least, when the command line ffmpeg cannot read those files but a simple C program can. Is it acceptable?
Best rgds,
Diep Ho
libavcodec/mpeg12.c
===================================================================
--- libavcodec/mpeg12.c (revision 14487)
+++ libavcodec/mpeg12.c (working copy)
@@ -1219,6 +1219,8 @@
s->mpeg_enc_ctx.avctx= avctx;
s->mpeg_enc_ctx.flags= avctx->flags;
s->mpeg_enc_ctx.flags2= avctx->flags2;
+ s->mpeg_enc_ctx.low_delay = !!(avctx->flags & CODEC_FLAG_LOW_DELAY);
+ avctx->has_b_frames = !s->mpeg_enc_ctx.low_delay;
ff_mpeg12_common_init(&s->mpeg_enc_ctx);
init_vlcs();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: low_delay.patch
Type: application/octet-stream
Size: 514 bytes
Desc: low_delay.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080804/f432da96/attachment.obj>
More information about the ffmpeg-devel
mailing list