Mercurial > libavformat.hg
diff mpeg.c @ 468:60f897e8dd2d libavformat
pass AVPacket into av_write_frame()
fixes the random dts/pts during encoding
asf preroll fix
no more initial zero frames for b frame encoding
mpeg-es dts during demuxing fixed
.ffm timestamp scale fixed, ffm is still broken though
author | michael |
---|---|
date | Sat, 29 May 2004 02:06:32 +0000 |
parents | 40069a91d1a0 |
children | 334e08488ad1 |
line wrap: on
line diff
--- a/mpeg.c Tue May 25 23:06:00 2004 +0000 +++ b/mpeg.c Sat May 29 02:06:32 2004 +0000 @@ -912,17 +912,22 @@ } -static int mpeg_mux_write_packet(AVFormatContext *ctx, int stream_index, - const uint8_t *buf, int size, - int64_t timestamp) +static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt) { MpegMuxContext *s = ctx->priv_data; + int stream_index= pkt->stream_index; + int size= pkt->size; + uint8_t *buf= pkt->data; AVStream *st = ctx->streams[stream_index]; StreamInfo *stream = st->priv_data; int64_t pts, dts, new_start_pts, new_start_dts; int len, avail_size; - compute_pts_dts(st, &pts, &dts, timestamp); + //XXX/FIXME this is and always was broken +// compute_pts_dts(st, &pts, &dts, pkt->pts); + + pts= pkt->pts; + dts= pkt->dts; if(s->is_svcd) { /* offset pts and dts slightly into the future to be able