Commit 97e7c6ec authored by Wim Taymans's avatar Wim Taymans

ext/ffmpeg/gstffmpegmux.c: Copy the codec aspect ratio to the stream, ffmpeg...

ext/ffmpeg/gstffmpegmux.c: Copy the codec aspect ratio to the stream, ffmpeg expects them to be the same. Fixes #560305.

Original commit message from CVS:
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_setcaps):
Copy the codec aspect ratio to the stream, ffmpeg expects them to be the
same. Fixes #560305.
parent 7ce8ab7a
2008-11-11 Wim Taymans <wim.taymans@collabora.co.uk>
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_setcaps):
Copy the codec aspect ratio to the stream, ffmpeg expects them to be the
same. Fixes #560305.
2008-11-10 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* configure.ac:
......
......@@ -316,13 +316,22 @@ gst_ffmpegmux_setcaps (GstPad * pad, GstCaps * caps)
/* for the format-specific guesses, we'll go to
* our famous codec mapper */
if (gst_ffmpeg_caps_to_codecid (caps, st->codec) != CODEC_ID_NONE) {
GST_LOG_OBJECT (pad, "accepted caps %" GST_PTR_FORMAT, caps);
return TRUE;
}
if (gst_ffmpeg_caps_to_codecid (caps, st->codec) == CODEC_ID_NONE)
goto not_accepted;
/* copy over the aspect ratios, ffmpeg expects the stream aspect to match the
* codec aspect. */
st->sample_aspect_ratio = st->codec->sample_aspect_ratio;
GST_LOG_OBJECT (pad, "accepted caps %" GST_PTR_FORMAT, caps);
return TRUE;
GST_LOG_OBJECT (pad, "rejecting caps %" GST_PTR_FORMAT, caps);
return FALSE;
/* ERRORS */
not_accepted:
{
GST_LOG_OBJECT (pad, "rejecting caps %" GST_PTR_FORMAT, caps);
return FALSE;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment