Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/codec/ffmpeg/ffmpegdecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,13 @@ FootageDescription FFmpegDecoder::Probe(const QString &filename, CancelAtom *can
// Read first frame and retrieve some metadata
if (instance.GetFrame(pkt, frame) >= 0) {
// Check if video is interlaced and what field dominance it has if so
#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(59,60,100)
if (frame->flags & AV_FRAME_FLAG_INTERLACED) {
if (frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) {
#else
if (frame->interlaced_frame) {
if (frame->top_field_first) {
#endif
interlacing = VideoParams::kInterlacedTopFirst;
} else {
interlacing = VideoParams::kInterlacedBottomFirst;
Expand Down
4 changes: 4 additions & 0 deletions app/codec/ffmpeg/ffmpegencoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -787,12 +787,16 @@ void FFmpegEncoder::FlushEncoders()
}

if (fmt_ctx_) {
#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(62,3,100)
if (fmt_ctx_->oformat->flags & AVFMT_ALLOW_FLUSH) {
#endif
int r = av_interleaved_write_frame(fmt_ctx_, nullptr);
if (r < 0) {
FFmpegError(tr("Failed to write interleaved packet"), r);
}
#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(62,3,100)
}
#endif
}
}

Expand Down