Commit 5c459504 authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg/flush_encoders: dont mux packets once ost->finished has been set

Fixes muxing frames after av_interleaved_write_frame() failure
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 706741e8
...@@ -1389,6 +1389,10 @@ static void flush_encoders(void) ...@@ -1389,6 +1389,10 @@ static void flush_encoders(void)
stop_encoding = 1; stop_encoding = 1;
break; break;
} }
if (ost->finished > 1) {
av_free_packet(&pkt);
continue;
}
if (pkt.pts != AV_NOPTS_VALUE) if (pkt.pts != AV_NOPTS_VALUE)
pkt.pts = av_rescale_q(pkt.pts, enc->time_base, ost->st->time_base); pkt.pts = av_rescale_q(pkt.pts, enc->time_base, ost->st->time_base);
if (pkt.dts != AV_NOPTS_VALUE) if (pkt.dts != AV_NOPTS_VALUE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment