avformat/mpegtsenc: fix dts for chained muxing aac in mpegts
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 19 May 2014 14:30:01 +0000 (16:30 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 19 May 2014 14:30:46 +0000 (16:30 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mpegtsenc.c

index 4847761..73026a0 100644 (file)
@@ -1270,6 +1270,8 @@ static int mpegts_write_packet_internal(AVFormatContext *s, AVPacket *pkt)
             av_init_packet(&pkt2);
             pkt2.data = pkt->data;
             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);
             if (ret < 0)
                 return AVERROR(ENOMEM);