From 20f02229cd4263b350897bed1d4d2b18b6a51a25 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 29 Nov 2016 17:16:22 +0100 Subject: player: don't print format detection error when aborting loading The way playback/loading is stopped on the demuxer layer makes it report an error to the higher levels of the player. But if playback/loading was explicitly aborted, printing such an error is confusing and misleading. This was probably just an oversight anyway. Fix it by using the libmpv API reported error field instead, which handles this better. --- player/loadfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player') diff --git a/player/loadfile.c b/player/loadfile.c index 6ea4479d7a..b94ce8af43 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -1231,7 +1231,7 @@ terminate_playback: MP_VERBOSE(mpctx, "finished playback, %s (reason %d)\n", mpv_error_string(end_event.error), end_event.reason); - if (mpctx->error_playing == MPV_ERROR_UNKNOWN_FORMAT) + if (end_event.error == MPV_ERROR_UNKNOWN_FORMAT) MP_ERR(mpctx, "Failed to recognize file format.\n"); MP_INFO(mpctx, "\n"); -- cgit v1.2.3