libopenh264dec: Fix cleanup if the init failed early

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö 2016-07-14 22:03:16 +03:00
parent 61cb9fac47
commit d0b1e6049b
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ static av_cold int svc_decode_close(AVCodecContext *avctx)
if (s->decoder) if (s->decoder)
WelsDestroyDecoder(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_fifo_generic_read(s->packet_fifo, &pkt, sizeof(pkt), NULL);
av_packet_unref(&pkt); av_packet_unref(&pkt);
} }