summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2013-11-25 15:17:33 +1100
committerSebastian Dröge <sebastian@centricular.com>2013-11-26 12:32:04 +0100
commit75a7cff360601e2fa7b6e336c857da7c56b53eff (patch)
treeab4e42f5c9d4b6fc94aa0955721a2f47e5d1fbad
parent1e2cd5ae3a708d14eae45232ff6cac629814e325 (diff)
downloadgstreamer-plugins-bad-75a7cff360601e2fa7b6e336c857da7c56b53eff.tar.gz
dvdspu: Don't unmap an unreffed buffer
gst_dvd_spu_finish_spu_buf drops the reference to the current buffer, so make sure to call gst_buffer_unmap before it.
-rw-r--r--gst/dvdspu/gstspu-vobsub.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/dvdspu/gstspu-vobsub.c b/gst/dvdspu/gstspu-vobsub.c
index 6e9f1dd12..fa05d5b9b 100644
--- a/gst/dvdspu/gstspu-vobsub.c
+++ b/gst/dvdspu/gstspu-vobsub.c
@@ -398,13 +398,14 @@ gstspu_vobsub_execute_event (GstDVDSpu * dvdspu)
if (next_blk != state->vobsub.cur_cmd_blk) {
/* Advance to the next block of commands */
ret = gst_dvd_spu_setup_cmd_blk (dvdspu, next_blk, start, end);
+ gst_buffer_unmap (state->vobsub.buf, &map);
} else {
/* Next Block points to the current block, so we're finished with this
* SPU buffer */
+ gst_buffer_unmap (state->vobsub.buf, &map);
gst_dvd_spu_finish_spu_buf (dvdspu);
ret = FALSE;
}
- gst_buffer_unmap (state->vobsub.buf, &map);
return ret;
}