summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2012-01-12 14:34:25 +0000
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2012-01-12 14:34:25 +0000
commitb6edb1a03aefee0006d7d163d28448d1d5cd5140 (patch)
tree9d104738e8efe31757d141d4857ba3fabfc1b658 /gst-libs
parent3942c8c7533f76d984cfa274f09dc7db8925b6c1 (diff)
downloadgstreamer-plugins-bad-b6edb1a03aefee0006d7d163d28448d1d5cd5140.tar.gz
mpegvideoparser: fix memory leak
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/codecparsers/gstmpegvideoparser.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gst-libs/gst/codecparsers/gstmpegvideoparser.c b/gst-libs/gst/codecparsers/gstmpegvideoparser.c
index 009c02bd1..b725d9d35 100644
--- a/gst-libs/gst/codecparsers/gstmpegvideoparser.c
+++ b/gst-libs/gst/codecparsers/gstmpegvideoparser.c
@@ -332,8 +332,10 @@ gst_mpeg_video_parse (const guint8 * data, gsize size, guint offset)
codoffsize->offset = gst_byte_reader_get_pos (&br) + offset;
rsize = gst_byte_reader_get_remaining (&br);
- if (rsize <= 0)
+ if (rsize <= 0) {
+ g_free (codoffsize);
break;
+ }
off = scan_for_start_codes (&br, 0, rsize);