aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/libopenh264dec.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2016-07-14 22:03:16 +0300
committerMartin Storsjö <martin@martin.st>2016-07-15 13:36:20 +0300
commitd0b1e6049b06eeeeca146ece4d2f199c5dba1565 (patch)
treef4e8957823ca278dd340751e66672d3c53311e1d /libavcodec/libopenh264dec.c
parent61cb9fac47498a38dfe7623f66aa1f3696e9158c (diff)
downloadffmpeg-d0b1e6049b06eeeeca146ece4d2f199c5dba1565.tar.gz
libopenh264dec: Fix cleanup if the init failed early
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/libopenh264dec.c')
-rw-r--r--libavcodec/libopenh264dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c
index cdbea7be57..a105fa52d9 100644
--- a/libavcodec/libopenh264dec.c
+++ b/libavcodec/libopenh264dec.c
@@ -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);
}