Revision e07b882b libavformat/mxfenc.c

View differences:

libavformat/mxfenc.c
1836 1836
            // purge packet queue
1837 1837
            while (pktl) {
1838 1838
                AVPacketList *next = pktl->next;
1839

  
1840
                if(s->streams[pktl->pkt.stream_index]->last_in_packet_buffer == pktl)
1841
                    s->streams[pktl->pkt.stream_index]->last_in_packet_buffer= NULL;
1839 1842
                av_free_packet(&pktl->pkt);
1840 1843
                av_freep(&pktl);
1841 1844
                pktl = next;
......
1844 1847
                last->next = NULL;
1845 1848
            else {
1846 1849
                s->packet_buffer = NULL;
1850
                s->packet_buffer_end= NULL;
1847 1851
                goto out;
1848 1852
            }
1849 1853
            pktl = s->packet_buffer;
......
1852 1856
        *out = pktl->pkt;
1853 1857
        //av_log(s, AV_LOG_DEBUG, "out st:%d dts:%lld\n", (*out).stream_index, (*out).dts);
1854 1858
        s->packet_buffer = pktl->next;
1859
        if(s->streams[pktl->pkt.stream_index]->last_in_packet_buffer == pktl)
1860
            s->streams[pktl->pkt.stream_index]->last_in_packet_buffer= NULL;
1861
        if(!s->packet_buffer)
1862
            s->packet_buffer_end= NULL;
1855 1863
        av_freep(&pktl);
1856 1864
        return 1;
1857 1865
    } else {

Also available in: Unified diff