summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetri Hintukainen <phintuka@users.sourceforge.net>2013-11-07 10:28:40 +0200
committerPetri Hintukainen <phintuka@users.sourceforge.net>2013-11-07 10:28:40 +0200
commit67f4db2771bedf4541e836b4aac3c2f36004dd4d (patch)
tree691890170a802cedba27016a2266ac2b2ec0a1fa
parent17016099d151f87ca12c46dd7ef212a10451a2e2 (diff)
downloadxine-lib-67f4db2771bedf4541e836b4aac3c2f36004dd4d.tar.gz
xine-lib-67f4db2771bedf4541e836b4aac3c2f36004dd4d.tar.bz2
avformat: be more verbose if opening input fails
-rw-r--r--src/combined/ffmpeg/demux_avformat.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/combined/ffmpeg/demux_avformat.c b/src/combined/ffmpeg/demux_avformat.c
index 3958a4049..08a163620 100644
--- a/src/combined/ffmpeg/demux_avformat.c
+++ b/src/combined/ffmpeg/demux_avformat.c
@@ -168,9 +168,15 @@ static input_plugin_t *input_avformat_get_instance (input_class_t *cls_gen, xine
/* open input file, and allocate format context */
AVFormatContext *fmt_ctx = NULL;
+ int error;
- if (avformat_open_input(&fmt_ctx, real_mrl ? real_mrl : mrl, NULL, &options) < 0) {
- xprintf (stream->xine, XINE_VERBOSITY_LOG, LOG_MODULE": Could not open source '%s'\n", mrl);
+ if ((error = avformat_open_input(&fmt_ctx, real_mrl ? real_mrl : mrl, NULL, &options)) < 0) {
+ char buf[80] = "";
+ if (!av_strerror(error, buf, sizeof(buf))) {
+ xprintf (stream->xine, XINE_VERBOSITY_LOG, LOG_MODULE": Could not open source '%s': %s\n", mrl, buf);
+ } else {
+ xprintf (stream->xine, XINE_VERBOSITY_LOG, LOG_MODULE": Could not open source '%s'\n", mrl);
+ }
free(real_mrl);
return NULL;
}