Due to the bump it is now certain that all devices that support flushing have the proper internal flag set. (Notice that the check for LIBAVFORMAT_VERSION was wrong.)
Unified · Split
| @@ -1236,13 +1236,7 @@ int av_write_frame(AVFormatContext *s, AVPacket *in) · 1235 unmodified lines | ||
| 1236 | 1236 | int ret; |
| 1237 | 1237 | |
| 1238 | 1238 | if (!in) { |
| 1239 | −#if FF_API_ALLOW_FLUSH || LIBAVFORMAT_VERSION_MAJOR >= 61 | |
| 1240 | − // Hint: The pulse audio output device has this set, | |
| 1241 | − // so we can't switch the check to FF_OFMT_FLAG_ALLOW_FLUSH immediately. | |
| 1242 | − if (s->oformat->flags & AVFMT_ALLOW_FLUSH) { | |
| 1243 | −#else | |
| 1244 | 1239 | if (ffofmt(s->oformat)->flags_internal & FF_OFMT_FLAG_ALLOW_FLUSH) { |
| 1245 | −#endif | |
| 1246 | 1240 | ret = ffofmt(s->oformat)->write_packet(s, NULL); |
| 1247 | 1241 | flush_if_needed(s); |
| 1248 | 1242 | if (ret >= 0 && s->pb && s->pb->error < 0) |