aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mxf.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-07-28 22:53:15 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-07-28 22:53:15 +0000
commit5e441e31ccbfacac4d0438604bcb1b309dacf4bc (patch)
treec0710e30b232c4271d96bdd06f645d1752899bcc /libavformat/mxf.c
parent743d772c61922cc0d4f44dedd36bcb9a45a444e0 (diff)
downloadffmpeg-5e441e31ccbfacac4d0438604bcb1b309dacf4bc.tar.gz
add error messages
Originally committed as revision 5838 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mxf.c')
-rw-r--r--libavformat/mxf.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/libavformat/mxf.c b/libavformat/mxf.c
index df17d61eba..4f176a74e7 100644
--- a/libavformat/mxf.c
+++ b/libavformat/mxf.c
@@ -222,8 +222,10 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)
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 @@ static int mxf_read_header(AVFormatContext *s, AVFormatParameters *ap)
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 @@ static int mxf_read_header(AVFormatContext *s, AVFormatParameters *ap)
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);
}