ffmpeg: check ost->finished in reap_filters()

This avoids finished output streams continuing to receive frames

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg: check ost->finished in check_output_constraints()

No testcase but it seems logic to stop when finished is set

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg: properly close down muxers on av_interleaved_write_frame() failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg/flush_encoders: dont mux packets once ost->finished has been set

Fixes muxing frames after av_interleaved_write_frame() failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg: update statistics only when a packet is actually muxed

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg: change ost->finished to an enum

Idea-by: ramiro
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>