]> git.sesse.net Git - nageru/commitdiff
Set dts for audio; evidently needed to unconfuse players.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 11 Oct 2015 21:06:54 +0000 (23:06 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 11 Oct 2015 21:06:54 +0000 (23:06 +0200)
h264encode.cpp

index 315ced748bc035a6df1075c05df7642d091226f6..487a5d681ae850d3fa01d89e3ad14052118b1457 100644 (file)
@@ -1641,7 +1641,7 @@ int H264Encoder::save_codeddata(storage_task task)
         avcodec_encode_audio2(avstream_audio->codec, &pkt, frame, &got_output);
         if (got_output) {
             pkt.pts = av_rescale_q(display_order + pts_dts_delay, AVRational{1, frame_rate}, avstream_audio->time_base);  // FIXME
-            pkt.dts = 0;
+            pkt.dts = pkt.pts;
             pkt.stream_index = 1;
             av_interleaved_write_frame(avctx, &pkt);
         }