mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
matroskamux: Always write the default frame duration for VP8/9 too
The WebM spec allows this now, and it allows us to guess a framerate. See https://bugzilla.gnome.org/show_bug.cgi?id=772141 and also https://bugzilla.gnome.org/show_bug.cgi?id=654379
This commit is contained in:
parent
7025d014bb
commit
7ab3df4542
1 changed files with 0 additions and 8 deletions
|
@ -357,7 +357,6 @@ gst_matroska_mux_class_init (GstMatroskaMuxClass * klass)
|
||||||
* Start of pad option handler code
|
* Start of pad option handler code
|
||||||
*/
|
*/
|
||||||
#define DEFAULT_PAD_FRAME_DURATION TRUE
|
#define DEFAULT_PAD_FRAME_DURATION TRUE
|
||||||
#define DEFAULT_PAD_FRAME_DURATION_VP8 FALSE
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -978,13 +977,6 @@ gst_matroska_mux_video_pad_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
videocontext->pixel_width = width;
|
videocontext->pixel_width = width;
|
||||||
videocontext->pixel_height = height;
|
videocontext->pixel_height = height;
|
||||||
|
|
||||||
/* set vp8 defaults or let user override it */
|
|
||||||
if (GST_MATROSKAMUX_PAD_CAST (pad)->frame_duration_user == FALSE
|
|
||||||
&& (!strcmp (mimetype, "video/x-vp8")
|
|
||||||
|| !strcmp (mimetype, "video/x-vp9")))
|
|
||||||
GST_MATROSKAMUX_PAD_CAST (pad)->frame_duration =
|
|
||||||
DEFAULT_PAD_FRAME_DURATION_VP8;
|
|
||||||
|
|
||||||
if (GST_MATROSKAMUX_PAD_CAST (pad)->frame_duration
|
if (GST_MATROSKAMUX_PAD_CAST (pad)->frame_duration
|
||||||
&& gst_structure_get_fraction (structure, "framerate", &fps_n, &fps_d)
|
&& gst_structure_get_fraction (structure, "framerate", &fps_n, &fps_d)
|
||||||
&& fps_n > 0) {
|
&& fps_n > 0) {
|
||||||
|
|
Loading…
Reference in a new issue