Skip to content
Snippets Groups Projects
Commit d0b1e604 authored by Martin Storsjö's avatar Martin Storsjö
Browse files

libopenh264dec: Fix cleanup if the init failed early

parent 61cb9fac
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,7 @@ static av_cold int svc_decode_close(AVCodecContext *avctx)
if (s->decoder)
WelsDestroyDecoder(s->decoder);
while (av_fifo_size(s->packet_fifo) >= sizeof(pkt)) {
while (s->packet_fifo && av_fifo_size(s->packet_fifo) >= sizeof(pkt)) {
av_fifo_generic_read(s->packet_fifo, &pkt, sizeof(pkt), NULL);
av_packet_unref(&pkt);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment