summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.com>2011-12-30 00:02:46 -0300
committerThiago Santos <thiago.sousa.santos@collabora.com>2011-12-30 00:02:46 -0300
commit51f399686eb172baf7b27b300b8b84869fdb85fa (patch)
tree03e59d96371c928b1f507e22422f1059ce21c621 /gst-libs
parente4d3d2dcd115ce6b3744ab852adeed04d438ac04 (diff)
basevideocodec: Reset should reset current caps
New caps will need to be negotiated when reset happens (PAUSED to READY). Without reseting the internal stored format, basevideoencoder/decoder wouldn't call the configuration function when the same caps was negotiated again as they would believe this was the same caps as before. The issue is that _stop has been called when going to READY and the elements would have reset their internal codec libs/state as well. A new configuration should be done.
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/video/gstbasevideocodec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gst-libs/gst/video/gstbasevideocodec.c b/gst-libs/gst/video/gstbasevideocodec.c
index a1dc91db4..9c130ed5e 100644
--- a/gst-libs/gst/video/gstbasevideocodec.c
+++ b/gst-libs/gst/video/gstbasevideocodec.c
@@ -134,6 +134,8 @@ gst_base_video_codec_reset (GstBaseVideoCodec * base_video_codec)
gst_buffer_replace (&base_video_codec->state.codec_data, NULL);
gst_caps_replace (&base_video_codec->state.caps, NULL);
+ memset (&base_video_codec->state, 0, sizeof (GstVideoState));
+ base_video_codec->state.format = GST_VIDEO_FORMAT_UNKNOWN;
GST_BASE_VIDEO_CODEC_STREAM_UNLOCK (base_video_codec);
}