summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-01-12 23:24:27 +0100
committerStefano Sabatini <stefasab@gmail.com>2012-06-29 14:50:27 +0200
commit0692d4c890bcefa708b8ee05c9f89baa2b25a22a (patch)
treea879450fe62c92f676531acf60db3ae818bd305f
parent567eb9d3448580a9ddf9e55443e1a4426e3c25e3 (diff)
lavf/segment: add some debugging logs
-rw-r--r--libavformat/segment.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/segment.c b/libavformat/segment.c
index 6025aad806..4a33c6588e 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -81,6 +81,8 @@ static int segment_start(AVFormatContext *s)
return 0;
fail:
+ av_log(oc, AV_LOG_ERROR, "Failure occurred when starting segment '%s'\n",
+ oc->filename);
avio_close(oc->pb);
av_freep(&oc->priv_data);
@@ -94,6 +96,10 @@ static int segment_end(AVFormatContext *oc)
if (oc->oformat->write_trailer)
ret = oc->oformat->write_trailer(oc);
+ if (ret < 0)
+ av_log(oc, AV_LOG_ERROR, "Failure occurred when ending segment '%s'\n",
+ oc->filename);
+
avio_close(oc->pb);
if (oc->oformat->priv_class)
av_opt_free(oc->priv_data);