media-playback: Fix crash on free
Need to call mp_decode_clear_packets before destroying orig_pkt in case packet_pending is true.
This commit is contained in:
parent
c2122b0916
commit
d3bd511d4d
6
deps/media-playback/media-playback/decode.c
vendored
6
deps/media-playback/media-playback/decode.c
vendored
@ -251,12 +251,12 @@ void mp_decode_clear_packets(struct mp_decode *d)
|
||||
|
||||
void mp_decode_free(struct mp_decode *d)
|
||||
{
|
||||
av_packet_free(&d->pkt);
|
||||
av_packet_free(&d->orig_pkt);
|
||||
|
||||
mp_decode_clear_packets(d);
|
||||
circlebuf_free(&d->packets);
|
||||
|
||||
av_packet_free(&d->pkt);
|
||||
av_packet_free(&d->orig_pkt);
|
||||
|
||||
if (d->hw_frame) {
|
||||
av_frame_unref(d->hw_frame);
|
||||
av_free(d->hw_frame);
|
||||
|
Loading…
x
Reference in New Issue
Block a user