Close decoder on stream ended
Add missing call to decoder_close().
This commit is contained in:
parent
056e47e752
commit
4961256123
1 changed files with 5 additions and 1 deletions
|
@ -198,7 +198,7 @@ run_stream(void *data) {
|
||||||
|
|
||||||
if (stream->recorder && !recorder_open(stream->recorder, codec)) {
|
if (stream->recorder && !recorder_open(stream->recorder, codec)) {
|
||||||
LOGE("Could not open recorder");
|
LOGE("Could not open recorder");
|
||||||
goto finally_close_input;
|
goto finally_close_decoder;
|
||||||
}
|
}
|
||||||
|
|
||||||
AVPacket packet;
|
AVPacket packet;
|
||||||
|
@ -248,6 +248,10 @@ quit:
|
||||||
if (stream->recorder) {
|
if (stream->recorder) {
|
||||||
recorder_close(stream->recorder);
|
recorder_close(stream->recorder);
|
||||||
}
|
}
|
||||||
|
finally_close_decoder:
|
||||||
|
if (stream->decoder) {
|
||||||
|
decoder_close(stream->decoder);
|
||||||
|
}
|
||||||
finally_close_input:
|
finally_close_input:
|
||||||
avformat_close_input(&format_ctx);
|
avformat_close_input(&format_ctx);
|
||||||
finally_free_avio_ctx:
|
finally_free_avio_ctx:
|
||||||
|
|
Loading…
Reference in a new issue