From 23f2464658be9be3b73d4ddf0ae881f935ff3a4d Mon Sep 17 00:00:00 2001 From: David Schleef Date: Wed, 23 Jul 2003 05:02:25 +0000 Subject: [PATCH] And also handle the case where caps have alredy been negotiated, and you are switching from PAUSED->PLAYING. Original commit message from CVS: And also handle the case where caps have alredy been negotiated, and you are switching from PAUSED->PLAYING. --- ext/mpeg2dec/gstmpeg2dec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/mpeg2dec/gstmpeg2dec.c b/ext/mpeg2dec/gstmpeg2dec.c index 7f9b61ac72..522578b7af 100644 --- a/ext/mpeg2dec/gstmpeg2dec.c +++ b/ext/mpeg2dec/gstmpeg2dec.c @@ -1067,6 +1067,12 @@ gst_mpeg2dec_change_state (GstElement *element) break; } case GST_STATE_PAUSED_TO_PLAYING: + /* if we've negotiated caps, try to get a bufferpool */ + if (mpeg2dec->peerpool == NULL && mpeg2dec->width > 0) { + mpeg2dec->peerpool = gst_pad_get_bufferpool (mpeg2dec->srcpad); + if (mpeg2dec->peerpool) + GST_INFO ( "got pool %p", mpeg2dec->peerpool); + } break; case GST_STATE_PLAYING_TO_PAUSED: /* need to clear things we get from other plugins, since we could be reconnected */