From: James Almer <[email protected]>

Signed-off-by: James Almer <[email protected]>
---
 libavformat/mpjpegdec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c
index fda4c38..df7cb5f 100644
--- a/libavformat/mpjpegdec.c
+++ b/libavformat/mpjpegdec.c
@@ -84,7 +84,7 @@ static int mpjpeg_read_probe(AVProbeData *p)
     int ret = 0;
 
     if (p->buf_size < 2 || p->buf[0] != '-' || p->buf[1] != '-')
-        return 0;
+        goto end;
 
     pb = avio_alloc_context(p->buf, p->buf_size, 0, NULL, NULL, NULL, NULL);
     if (!pb)
@@ -102,6 +102,7 @@ static int mpjpeg_read_probe(AVProbeData *p)
         }
     }
 
+end:
     av_free(pb);
 
     return ret;
-- 
1.9.5 (Apple Git-50.3)

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to