diff options
author | wm4 <wm4@nowhere> | 2013-12-21 23:15:32 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-21 23:15:32 +0100 |
commit | 0a3e9a9ac3a90da831b497e0613dfb66bc14f3d2 (patch) | |
tree | b70f214f8c3fc802d6d6edbf8395273c854ac0fd /player/timeline/tl_mpv_edl.c | |
parent | a4fe95b0d8d339ba5afbdb5346ad8fd367a4a1c1 (diff) | |
parent | 245e5b844177e9ad9a9c07eff5efab7c3fccdebc (diff) | |
download | mpv-0a3e9a9ac3a90da831b497e0613dfb66bc14f3d2.tar.bz2 mpv-0a3e9a9ac3a90da831b497e0613dfb66bc14f3d2.tar.xz |
Merge branch 'msg_refactor'
This branch changes mp_msg() so that it doesn't require global context.
The changes are pretty violent.
Diffstat (limited to 'player/timeline/tl_mpv_edl.c')
-rw-r--r-- | player/timeline/tl_mpv_edl.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/player/timeline/tl_mpv_edl.c b/player/timeline/tl_mpv_edl.c index 95bb03e2d8..651c937c23 100644 --- a/player/timeline/tl_mpv_edl.c +++ b/player/timeline/tl_mpv_edl.c @@ -123,17 +123,17 @@ static struct demuxer *open_file(char *filename, struct MPContext *mpctx) { struct MPOpts *opts = mpctx->opts; struct demuxer *d = NULL; - struct stream *s = stream_open(filename, opts); + struct stream *s = stream_open(filename, mpctx->global); if (s) { stream_enable_cache_percent(&s, opts->stream_cache_size, opts->stream_cache_def_size, opts->stream_cache_min_percent, opts->stream_cache_seek_min_percent); - d = demux_open(s, NULL, NULL, opts); + d = demux_open(s, NULL, NULL, mpctx->global); } if (!d) { - mp_msg(MSGT_CPLAYER, MSGL_ERR, "EDL: Could not open source file '%s'.\n", + MP_ERR(mpctx, "EDL: Could not open source file '%s'.\n", filename); free_stream(s); } @@ -197,8 +197,7 @@ static void build_timeline(struct MPContext *mpctx, struct tl_parts *parts) double len = source_get_length(source); if (len <= 0) { - mp_msg(MSGT_CPLAYER, MSGL_WARN, - "EDL: source file '%s' has unknown duration.\n", + MP_WARN(mpctx, "EDL: source file '%s' has unknown duration.\n", part->filename); } @@ -210,7 +209,7 @@ static void build_timeline(struct MPContext *mpctx, struct tl_parts *parts) if (len > 0) { double partlen = part->offset + part->length; if (partlen > len) { - mp_msg(MSGT_CPLAYER, MSGL_WARN, "EDL: entry %d uses %f " + MP_WARN(mpctx, "EDL: entry %d uses %f " "seconds, but file has only %f seconds.\n", n, partlen, len); } @@ -263,7 +262,7 @@ void build_mpv_edl_timeline(struct MPContext *mpctx) { struct tl_parts *parts = parse_edl(mpctx->demuxer->file_contents); if (!parts) { - mp_msg(MSGT_CPLAYER, MSGL_ERR, "Error in EDL.\n"); + MP_ERR(mpctx, "Error in EDL.\n"); return; } // Source is .edl and not edl:// => don't allow arbitrary paths |