From 9e793074310c1684c8c7682fad5a7c91c47e761e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 28 Jul 2010 16:15:53 +0200 Subject: [PATCH] qtmux: use caps bitrate at last chance If we didn't get the stream's bitrate from one of the atoms, try getting it from the caps as a last resort. https://bugzilla.gnome.org/show_bug.cgi?id=625496 --- gst/quicktime/gstqtmux.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gst/quicktime/gstqtmux.c b/gst/quicktime/gstqtmux.c index 3b7d947..501da21 100644 --- a/gst/quicktime/gstqtmux.c +++ b/gst/quicktime/gstqtmux.c @@ -2318,6 +2318,11 @@ gst_qt_mux_video_sink_set_caps (GstPad * pad, GstCaps * caps) } else if (strcmp (mimetype, "video/x-h264") == 0) { entry.fourcc = FOURCC_avc1; qtpad->is_out_of_order = TRUE; + if (qtpad->avg_bitrate == 0) { + gint avg_bitrate = 0; + gst_structure_get_int (structure, "bitrate", &avg_bitrate); + qtpad->avg_bitrate = avg_bitrate; + } ext_atom = build_btrt_extension (0, qtpad->avg_bitrate, qtpad->max_bitrate); if (ext_atom != NULL) ext_atom_list = g_list_prepend (ext_atom_list, ext_atom); -- 2.7.4