[Ffmpeg-devel] [PATCH] Comment mpegtsenc. Add CODEC_TYPE_DATA support
Alexander Kurpiers
a.kurpiers
Wed Dec 6 16:14:04 CET 2006
Andy Parkins wrote:
> libavformat/mpegtsenc.c
> * To gain understanding, I've commented a large chunk of the file
> * Added CODEC_TYPE_DATA support; fairly simple - dealt with just as
> subtitle packets are - i.e. never buffered, always sent instantly
>
> ...
> diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
> index 39868be..d46214e 100644
> --- a/libavformat/mpegtsenc.c
> +++ b/libavformat/mpegtsenc.c
...
> ts_st->payload_index += len;
> + /* If there is no PTS defined in this PES, set it to be the same as
> + * the packet PTS */
> if (ts_st->payload_pts == AV_NOPTS_VALUE)
> ts_st->payload_pts = pkt->pts;
As you are working on this anyway... this is plain nonsense IMHO. The
definition of PTS is different in the MPEG2 System spec:
"... In the case of video, if a PTS is present in a PES packet header it
shall refer to the access unit containing the first picture start code
that commences in this PES packet. A picture start code commences in PES
packet if the first byte of the picture start code is present in the PES
packet. "
But we don't know where video packets actually start - at least not at this
point.
I tried to fix it some months ago but it was agreed that mpegtsenc needs
more fixes than just that. Unfortunately I did not have the time for that.
(http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2006-February/007983.html
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2006-March/008312.html)
More information about the ffmpeg-devel
mailing list