[FFmpeg-devel] [PATCH] make mpeg4 parser set has_b_frames

Michael Niedermayer michaelni
Thu Nov 22 01:32:08 CET 2007


On Thu, Nov 22, 2007 at 12:45:01AM +0100, elupus wrote:
>
> On a different but related note, should pts really be set to dts in 
> compute_pkt_fields if pts is missing? wouldn't it be better to leave that 
> up to the player? or atleast be conditional on GENPTS flag.

what you say makes no sense, because the code doesnt do what you claim
it does, please RTFS!

also ffmpeg fills missing information in to simplify the code needed by
applications. if you have a example where ffmpeg makes a mistake send
a proper bug report.

[...]

> Index: libavcodec/mpeg4video_parser.c
> ===================================================================
> --- libavcodec/mpeg4video_parser.c	(revision 11070)
> +++ libavcodec/mpeg4video_parser.c	(working copy)
> @@ -85,6 +85,7 @@
>     if (s->width) {
>         avcodec_set_dimensions(avctx, s->width, s->height);
>     }
> +    avctx->has_b_frames = !s->low_delay;
>     s1->pict_type= s->pict_type;
>     pc->first_picture = 0;
>     return ret;

and stop sending mangled patches!
besides that this is not a valid patch (and i wont bother doing your work
fixing that), it would likely be ok

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

I count him braver who overcomes his desires than him who conquers his
enemies for the hardest victory is over self. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071122/d0a09cd8/attachment.pgp>



More information about the ffmpeg-devel mailing list