Revision 2851b1f6 libavformat/matroskadec.c

View differences:

libavformat/matroskadec.c
1085 1085
        if (tags[i].target.attachuid) {
1086 1086
            MatroskaAttachement *attachment = matroska->attachments.elem;
1087 1087
            for (j=0; j<matroska->attachments.nb_elem; j++)
1088
                if (attachment[j].uid == tags[i].target.attachuid)
1088
                if (attachment[j].uid == tags[i].target.attachuid
1089
                    && attachment[j].stream)
1089 1090
                    matroska_convert_tag(s, &tags[i].tag,
1090 1091
                                         &attachment[j].stream->metadata, NULL);
1091 1092
        } else if (tags[i].target.chapteruid) {
1092 1093
            MatroskaChapter *chapter = matroska->chapters.elem;
1093 1094
            for (j=0; j<matroska->chapters.nb_elem; j++)
1094
                if (chapter[j].uid == tags[i].target.chapteruid)
1095
                if (chapter[j].uid == tags[i].target.chapteruid
1096
                    && chapter[j].chapter)
1095 1097
                    matroska_convert_tag(s, &tags[i].tag,
1096 1098
                                         &chapter[j].chapter->metadata, NULL);
1097 1099
        } else if (tags[i].target.trackuid) {
1098 1100
            MatroskaTrack *track = matroska->tracks.elem;
1099 1101
            for (j=0; j<matroska->tracks.nb_elem; j++)
1100
                if (track[j].uid == tags[i].target.trackuid)
1102
                if (track[j].uid == tags[i].target.trackuid && track[j].stream)
1101 1103
                    matroska_convert_tag(s, &tags[i].tag,
1102 1104
                                         &track[j].stream->metadata, NULL);
1103 1105
        } else {

Also available in: Unified diff