Revision b09e5068 libavformat/matroskadec.c

View differences:

libavformat/matroskadec.c
127 127
    int      sub_packet_size;
128 128
    int      sub_packet_cnt;
129 129
    int      pkt_cnt;
130
    uint64_t buf_timecode;
130 131
    uint8_t *buf;
131 132
} MatroskaTrackAudio;
132 133

  
......
1740 1741
                int x;
1741 1742

  
1742 1743
                if (!track->audio.pkt_cnt) {
1744
                    if (track->audio.sub_packet_cnt == 0)
1745
                        track->audio.buf_timecode = timecode;
1743 1746
                    if (st->codec->codec_id == CODEC_ID_RA_288)
1744 1747
                        for (x=0; x<h/2; x++)
1745 1748
                            memcpy(track->audio.buf+x*2*w+y*cfs,
......
1762 1765
                    av_new_packet(pkt, a);
1763 1766
                    memcpy(pkt->data, track->audio.buf
1764 1767
                           + a * (h*w / a - track->audio.pkt_cnt--), a);
1768
                    pkt->pts = track->audio.buf_timecode;
1769
                    track->audio.buf_timecode = AV_NOPTS_VALUE;
1765 1770
                    pkt->pos = pos;
1766 1771
                    pkt->stream_index = st->index;
1767 1772
                    dynarray_add(&matroska->packets,&matroska->num_packets,pkt);
......
1903 1908

  
1904 1909
    index_min = index;
1905 1910
    for (i=0; i < matroska->tracks.nb_elem; i++) {
1911
        tracks[i].audio.pkt_cnt = 0;
1912
        tracks[i].audio.sub_packet_cnt = 0;
1913
        tracks[i].audio.buf_timecode = AV_NOPTS_VALUE;
1906 1914
        tracks[i].end_timecode = 0;
1907 1915
        if (tracks[i].type == MATROSKA_TRACK_TYPE_SUBTITLE
1908 1916
            && !tracks[i].stream->discard != AVDISCARD_ALL) {

Also available in: Unified diff