[Ffmpeg-cvslog] r5838 - trunk/libavformat/mxf.c

bcoudurier subversion
Sat Jul 29 00:53:15 CEST 2006


Author: bcoudurier
Date: Sat Jul 29 00:53:15 2006
New Revision: 5838

Modified:
   trunk/libavformat/mxf.c

Log:
add error messages

Modified: trunk/libavformat/mxf.c
==============================================================================
--- trunk/libavformat/mxf.c	(original)
+++ trunk/libavformat/mxf.c	Sat Jul 29 00:53:15 2006
@@ -222,8 +222,10 @@
     KLVPacket klv;
 
     while (!url_feof(&s->pb)) {
-        if (klv_read_packet(&klv, &s->pb) < 0)
+        if (klv_read_packet(&klv, &s->pb) < 0) {
+            av_log(s, AV_LOG_ERROR, "error reading KLV packet\n");
             return -1;
+        }
         if (IS_KLV_KEY(klv.key, mxf_essence_element_key)) {
             av_get_packet(&s->pb, pkt, klv.length);
             pkt->stream_index = mxf_get_stream_index(s, &klv);
@@ -822,8 +824,10 @@
 
     mxf->fc = s;
     while (!url_feof(&s->pb)) {
-        if (klv_read_packet(&klv, &s->pb) < 0)
+        if (klv_read_packet(&klv, &s->pb) < 0) {
+            av_log(s, AV_LOG_ERROR, "error reading KLV packet\n");
             return -1;
+        }
         if (IS_KLV_KEY(klv.key, mxf_metadata_track_key))
             ret = mxf_read_metadata_track(mxf, &klv);
         else if (IS_KLV_KEY(klv.key, mxf_metadata_static_track_key))
@@ -856,8 +860,10 @@
             break;
         } else
             url_fskip(&s->pb, klv.length);
-        if (ret < 0)
+        if (ret < 0) {
+            av_log(s, AV_LOG_ERROR, "error reading header metadata\n");
             return ret;
+        }
     }
     return mxf_parse_structural_metadata(mxf);
 }




More information about the ffmpeg-cvslog mailing list