summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/libav/gstavviddec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c
index ce8d63e..0e909a4 100644
--- a/ext/libav/gstavviddec.c
+++ b/ext/libav/gstavviddec.c
@@ -371,8 +371,6 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder,
return TRUE;
}
- gst_caps_replace (&ffmpegdec->last_caps, state->caps);
-
GST_DEBUG_OBJECT (ffmpegdec, "setcaps called");
GST_OBJECT_LOCK (ffmpegdec);
@@ -389,6 +387,8 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder,
gst_ffmpegviddec_close (ffmpegdec);
}
+ gst_caps_replace (&ffmpegdec->last_caps, state->caps);
+
/* set buffer functions */
ffmpegdec->context->get_buffer = gst_ffmpegviddec_get_buffer;
ffmpegdec->context->reget_buffer = gst_ffmpegviddec_reget_buffer;