ffmpegenc: ensure proper clean state prior to (re-)negotiation

Fixes #632691.
This commit is contained in:
Mark Nauwelaerts 2010-10-25 12:14:42 +02:00
parent d82633c4e3
commit e837ec505d

View file

@ -526,6 +526,9 @@ gst_ffmpegenc_setcaps (GstPad * pad, GstCaps * caps)
if (ffmpegenc->opened) { if (ffmpegenc->opened) {
gst_ffmpeg_avcodec_close (ffmpegenc->context); gst_ffmpeg_avcodec_close (ffmpegenc->context);
ffmpegenc->opened = FALSE; ffmpegenc->opened = FALSE;
/* fixed src caps;
* so clear src caps for proper (re-)negotiation */
gst_pad_set_caps (ffmpegenc->srcpad, NULL);
} }
/* set defaults */ /* set defaults */