|
|
@ -635,6 +635,7 @@ void encoder_close(EncoderState *s) { |
|
|
|
if (s->remuxing) { |
|
|
|
if (s->remuxing) { |
|
|
|
av_write_trailer(s->ofmt_ctx); |
|
|
|
av_write_trailer(s->ofmt_ctx); |
|
|
|
avio_closep(&s->ofmt_ctx->pb); |
|
|
|
avio_closep(&s->ofmt_ctx->pb); |
|
|
|
|
|
|
|
avcodec_free_context(&s->codec_ctx); |
|
|
|
avformat_free_context(s->ofmt_ctx); |
|
|
|
avformat_free_context(s->ofmt_ctx); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
fclose(s->of); |
|
|
|
fclose(s->of); |
|
|
|