avformat/mpegtsenc: fix dts for chained muxing aac in mpegts

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-05-19 16:30:01 +02:00
parent dad54e4a62
commit 6552e23d56

View File

@ -1270,6 +1270,8 @@ static int mpegts_write_packet_internal(AVFormatContext *s, AVPacket *pkt)
av_init_packet(&pkt2); av_init_packet(&pkt2);
pkt2.data = pkt->data; pkt2.data = pkt->data;
pkt2.size = pkt->size; pkt2.size = pkt->size;
av_assert0(pkt->dts != AV_NOPTS_VALUE);
pkt2.dts = av_rescale_q(pkt->dts, st->time_base, ts_st->amux->streams[0]->time_base);
ret = avio_open_dyn_buf(&ts_st->amux->pb); ret = avio_open_dyn_buf(&ts_st->amux->pb);
if (ret < 0) if (ret < 0)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);