lavf/segment: add some debugging logs
authorStefano Sabatini <stefasab@gmail.com>
Thu, 12 Jan 2012 22:24:27 +0000 (23:24 +0100)
committerStefano Sabatini <stefasab@gmail.com>
Fri, 29 Jun 2012 12:50:27 +0000 (14:50 +0200)
libavformat/segment.c

index 6025aad..4a33c65 100644 (file)
@@ -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);