ext/ffmpeg/gstffmpegenc.c: Link with right caps (else, it segfaults).

Original commit message from CVS:
2004-01-16  Ronald Bultje  <rbultje@ronald.bitfreak.net>

* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Link with right caps (else, it segfaults).
* ext/mplex/gstmplexjob.cc:
Fix for slight API change in 1.6.1.93 release of mjpegtools.
This commit is contained in:
Ronald S. Bultje 2004-01-16 14:10:44 +00:00
parent 2b03152605
commit 8a6c344dc7
2 changed files with 3 additions and 3 deletions

2
common

@ -1 +1 @@
Subproject commit cd5507ae3df8dc48c07df9e37878846b6b79faa1
Subproject commit c81ad072c76522175cbddead96d6f3c448068d67

View file

@ -361,14 +361,14 @@ gst_ffmpegenc_connect (GstPad *pad,
if (gst_caps_get_size (icaps) > 1) {
GstCaps *newcaps;
newcaps = gst_caps_new_full (gst_caps_get_structure (icaps, 0), NULL);
newcaps = gst_caps_new_full (gst_structure_copy (gst_caps_get_structure (icaps, 0)), NULL);
gst_caps_free (icaps);
icaps = newcaps;
}
/* FIXME set_explicit_caps is not supposed to be used in a pad link
* function. */
if (!gst_pad_set_explicit_caps (ffmpegenc->srcpad, other_caps)) {
if (!gst_pad_set_explicit_caps (ffmpegenc->srcpad, icaps)) {
avcodec_close (ffmpegenc->context);
return GST_PAD_LINK_REFUSED;
}