summaryrefslogtreecommitdiff
path: root/libavformat/mpegtsenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-05-29 02:06:32 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-05-29 02:06:32 +0000
commite928649b0bf6c8c7b87eb09d5e393a70387b10e9 (patch)
tree3f065adcb0e5c14127d01162d7cc8a0d934c073f /libavformat/mpegtsenc.c
parenta7b2871cd1401ce7be59b153eed3f25565b0bb23 (diff)
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 Originally committed as revision 3168 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mpegtsenc.c')
-rw-r--r--libavformat/mpegtsenc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 7a20f8525a..fbbb83db03 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -549,10 +549,11 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
put_flush_packet(&s->pb);
}
-static int mpegts_write_packet(AVFormatContext *s, int stream_index,
- const uint8_t *buf, int size, int64_t pts1)
+static int mpegts_write_packet(AVFormatContext *s, AVPacket *pkt)
{
- AVStream *st = s->streams[stream_index];
+ AVStream *st = s->streams[pkt->stream_index];
+ int size= pkt->size;
+ uint8_t *buf= pkt->data;
MpegTSWriteStream *ts_st = st->priv_data;
int len;
@@ -565,7 +566,7 @@ static int mpegts_write_packet(AVFormatContext *s, int stream_index,
size -= len;
ts_st->payload_index += len;
if (ts_st->payload_pts == AV_NOPTS_VALUE)
- ts_st->payload_pts = pts1;
+ ts_st->payload_pts = pkt->pts;
if (ts_st->payload_index >= DEFAULT_PES_PAYLOAD_SIZE) {
mpegts_write_pes(s, st, ts_st->payload, ts_st->payload_index,
ts_st->payload_pts);