mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-04 17:52:29 +00:00
ext/ffmpeg/gstffmpegcodecmap.c: Whoops - handle input video caps that don't have a framerate
Original commit message from CVS: * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_caps_to_pixfmt): Whoops - handle input video caps that don't have a framerate
This commit is contained in:
parent
602e47bf4a
commit
1d43798752
2 changed files with 13 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-11-23 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
|
||||||
|
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_caps_to_pixfmt):
|
||||||
|
Whoops - handle input video caps that don't have a framerate
|
||||||
|
|
||||||
2005-11-23 Jan Schmidt <thaytan@mad.scientist.com>
|
2005-11-23 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
|
||||||
* HACKING:
|
* HACKING:
|
||||||
|
|
|
@ -1109,7 +1109,7 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps,
|
||||||
gst_structure_get_int (structure, "bpp", &context->bits_per_sample);
|
gst_structure_get_int (structure, "bpp", &context->bits_per_sample);
|
||||||
|
|
||||||
fps = gst_structure_get_value (structure, "framerate");
|
fps = gst_structure_get_value (structure, "framerate");
|
||||||
g_return_if_fail (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps));
|
if (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps)) {
|
||||||
|
|
||||||
/* somehow these seem mixed up.. */
|
/* somehow these seem mixed up.. */
|
||||||
context->time_base.den = gst_value_get_fraction_numerator (fps);
|
context->time_base.den = gst_value_get_fraction_numerator (fps);
|
||||||
|
@ -1118,10 +1118,13 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps,
|
||||||
GST_DEBUG ("setting framerate %d/%d = %lf",
|
GST_DEBUG ("setting framerate %d/%d = %lf",
|
||||||
context->time_base.den, context->time_base.num,
|
context->time_base.den, context->time_base.num,
|
||||||
1. * context->time_base.den / context->time_base.num);
|
1. * context->time_base.den / context->time_base.num);
|
||||||
|
}
|
||||||
|
|
||||||
if (!raw)
|
if (!raw)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
g_return_if_fail (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps));
|
||||||
|
|
||||||
if (strcmp (gst_structure_get_name (structure), "video/x-raw-yuv") == 0) {
|
if (strcmp (gst_structure_get_name (structure), "video/x-raw-yuv") == 0) {
|
||||||
guint32 fourcc;
|
guint32 fourcc;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue