Was audio stream calls in middle of video packet write correct, was seg faulting

This commit is contained in:
Steve Gilvarry 2016-09-27 00:42:40 +10:00
parent ab5dff1650
commit c81f48716a
1 changed files with 2 additions and 2 deletions

View File

@ -559,8 +559,8 @@ if ( 1 ) {
} }
if ( opkt.dts != AV_NOPTS_VALUE ) { if ( opkt.dts != AV_NOPTS_VALUE ) {
int64_t max = audio_output_stream->cur_dts + !(oc->oformat->flags & AVFMT_TS_NONSTRICT); int64_t max = video_output_stream->cur_dts + !(oc->oformat->flags & AVFMT_TS_NONSTRICT);
if (audio_output_stream->cur_dts && audio_output_stream->cur_dts != AV_NOPTS_VALUE && max > opkt.dts) { if (video_output_stream->cur_dts && video_output_stream->cur_dts != AV_NOPTS_VALUE && max > opkt.dts) {
Warning("st:%d PTS: %"PRId64" DTS: %"PRId64" < %"PRId64" invalid, clipping\n", opkt.stream_index, opkt.pts, opkt.dts, max); Warning("st:%d PTS: %"PRId64" DTS: %"PRId64" < %"PRId64" invalid, clipping\n", opkt.stream_index, opkt.pts, opkt.dts, max);
if( opkt.pts >= opkt.dts) if( opkt.pts >= opkt.dts)
opkt.pts = FFMAX(opkt.pts, max); opkt.pts = FFMAX(opkt.pts, max);