Bug #4704 ยป patch.diff
src/muxer/muxer_libav.c | ||
---|---|---|
554 | 554 |
static int |
555 | 555 |
lav_muxer_close(muxer_t *m) |
556 | 556 |
{ |
557 |
AVFormatContext *oc; |
|
557 | 558 |
int ret = 0; |
558 | 559 |
lav_muxer_t *lm = (lav_muxer_t*)m; |
559 | 560 | |
... | ... | |
563 | 564 |
lm->m_errors++; |
564 | 565 |
ret = -1; |
565 | 566 |
} |
567 | ||
568 |
oc = lm->lm_oc; |
|
569 |
avio_close(oc->pb); |
|
570 |
oc->pb=NULL; |
|
571 | ||
566 | 572 |
return ret; |
567 | 573 |
} |
568 | 574 | |
... | ... | |
587 | 593 |
av_freep(&lm->lm_oc->streams[i]->codec->extradata); |
588 | 594 |
} |
589 | 595 | |
590 |
if(lm->lm_oc && lm->lm_oc->pb) { |
|
591 |
av_freep(&lm->lm_oc->pb->buffer); |
|
592 |
av_freep(&lm->lm_oc->pb); |
|
593 |
} |
|
594 | ||
595 | 596 |
if(lm->lm_oc) { |
596 | 597 |
avformat_free_context(lm->lm_oc); |
597 | 598 |
lm->lm_oc = NULL; |