Revision 5e441e31 libavformat/mxf.c

View differences:

libavformat/mxf.c
222 222
    KLVPacket klv;
223 223

  
224 224
    while (!url_feof(&s->pb)) {
225
        if (klv_read_packet(&klv, &s->pb) < 0)
225
        if (klv_read_packet(&klv, &s->pb) < 0) {
226
            av_log(s, AV_LOG_ERROR, "error reading KLV packet\n");
226 227
            return -1;
228
        }
227 229
        if (IS_KLV_KEY(klv.key, mxf_essence_element_key)) {
228 230
            av_get_packet(&s->pb, pkt, klv.length);
229 231
            pkt->stream_index = mxf_get_stream_index(s, &klv);
......
822 824

  
823 825
    mxf->fc = s;
824 826
    while (!url_feof(&s->pb)) {
825
        if (klv_read_packet(&klv, &s->pb) < 0)
827
        if (klv_read_packet(&klv, &s->pb) < 0) {
828
            av_log(s, AV_LOG_ERROR, "error reading KLV packet\n");
826 829
            return -1;
830
        }
827 831
        if (IS_KLV_KEY(klv.key, mxf_metadata_track_key))
828 832
            ret = mxf_read_metadata_track(mxf, &klv);
829 833
        else if (IS_KLV_KEY(klv.key, mxf_metadata_static_track_key))
......
856 860
            break;
857 861
        } else
858 862
            url_fskip(&s->pb, klv.length);
859
        if (ret < 0)
863
        if (ret < 0) {
864
            av_log(s, AV_LOG_ERROR, "error reading header metadata\n");
860 865
            return ret;
866
        }
861 867
    }
862 868
    return mxf_parse_structural_metadata(mxf);
863 869
}

Also available in: Unified diff