Skip to content

Commit

Permalink
demux_lavf: remove fix_editlists hack for mp4
Browse files Browse the repository at this point in the history
Remove this "hack" from 2017 which disabled `advanced_editlist` while
demuxing mov/mp4. See: b7b12c3 as well
as b86a231

At present, advanced edit list support seems to be mature enough that it
doesn't need to be disabled by us and disabling it seems to break more
files based on testing with `elist` files in FFmpeg's FATE suite.
  • Loading branch information
llyyr authored and sfan5 committed Jan 11, 2024
1 parent 10321b8 commit bd5d8e4
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions demux/demux_lavf.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ struct format_hack {
// segment, with e.g. HLS, player knows about the playlist main file only).
bool clear_filepos : 1;
bool linearize_audio_ts : 1;// compensate timestamp resets (audio only)
bool fix_editlists : 1;
bool is_network : 1;
bool no_seek : 1;
bool no_pcm_seek : 1;
Expand Down Expand Up @@ -175,8 +174,7 @@ static const struct format_hack format_hacks[] = {
{"mxf", .use_stream_ids = true},
{"avi", .use_stream_ids = true},
{"asf", .use_stream_ids = true},
{"mp4", .skipinfo = true, .fix_editlists = true, .no_pcm_seek = true,
.use_stream_ids = true},
{"mp4", .skipinfo = true, .no_pcm_seek = true, .use_stream_ids = true},
{"matroska", .skipinfo = true, .no_pcm_seek = true, .use_stream_ids = true},

{"v4l2", .no_seek = true},
Expand Down Expand Up @@ -1065,9 +1063,6 @@ static int demux_open_lavf(demuxer_t *demuxer, enum demux_check check)

guess_and_set_vobsub_name(demuxer, &dopts);

if (priv->format_hack.fix_editlists)
av_dict_set(&dopts, "advanced_editlist", "0", 0);

avfc->interrupt_callback = (AVIOInterruptCB){
.callback = interrupt_cb,
.opaque = demuxer,
Expand Down Expand Up @@ -1267,8 +1262,6 @@ static bool demux_lavf_read_packet(struct demuxer *demux,
dp->duration = pkt->duration * av_q2d(st->time_base);
dp->pos = pkt->pos;
dp->keyframe = pkt->flags & AV_PKT_FLAG_KEY;
if (pkt->flags & AV_PKT_FLAG_DISCARD)
MP_ERR(demux, "Edit lists are not correctly supported (FFmpeg issue).\n");
av_packet_unref(pkt);

if (priv->format_hack.clear_filepos)
Expand Down

0 comments on commit bd5d8e4

Please sign in to comment.