Skip to content

Commit

Permalink
Don't set AVFMT_TS_NONSTRICT. Crashes on ffmpeg 5. Fixes #3497
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed Aug 12, 2022
1 parent 39afe4f commit 1cf0245
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/zm_videostore.cpp
Expand Up @@ -155,7 +155,10 @@ bool VideoStore::open() {
oc->metadata = pmetadata;
// Dirty hack to allow us to set flags. Needed for ffmpeg5
out_format = const_cast<AVOutputFormat *>(oc->oformat);
// ffmpeg 5 crashes if we do this
#if !LIBAVFORMAT_VERSION_CHECK(59, 16,100, 9, 0)
out_format->flags |= AVFMT_TS_NONSTRICT; // allow non increasing dts
#endif

const AVCodec *video_out_codec = nullptr;

Expand Down

0 comments on commit 1cf0245

Please sign in to comment.