1
0
mirror of https://github.com/mpv-player/mpv synced 2025-04-01 23:00:41 +00:00

demux: fix --stream-record runtime change handling

Well, if that wasn't particularly dumb.
This commit is contained in:
wm4 2019-12-29 20:18:35 +01:00
parent 0737d842b0
commit f0d0822595

View File

@ -2444,8 +2444,8 @@ static void update_opts(struct demux_internal *in)
mp_recorder_destroy(in->recorder);
in->recorder = NULL;
}
in->record_filename = talloc_strdup(in, opts->record_file);
talloc_free(in->record_filename);
in->record_filename = talloc_strdup(in, opts->record_file);
// Note: actual recording only starts once packets are read. It may be
// important to delay creating in->recorder to that point, because the
// demuxer might detect more streams until finding the first packet.