decoder/ffmpeg: use AtScopeExit() to call av_packet_unref()
This commit is contained in:
parent
08272cdee2
commit
bd115a4008
@ -627,6 +627,10 @@ FfmpegDecode(DecoderClient &client, InputStream &input,
|
||||
/* end of file */
|
||||
break;
|
||||
|
||||
AtScopeExit(&packet) {
|
||||
av_packet_unref(&packet);
|
||||
};
|
||||
|
||||
FfmpegCheckTag(client, input, format_context, audio_stream);
|
||||
|
||||
if (packet.size > 0 && packet.stream_index == audio_stream) {
|
||||
@ -640,8 +644,6 @@ FfmpegDecode(DecoderClient &client, InputStream &input,
|
||||
min_frame = 0;
|
||||
} else
|
||||
cmd = client.GetCommand();
|
||||
|
||||
av_packet_unref(&packet);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user