summaryrefslogtreecommitdiff
path: root/gst/qtmux
diff options
context:
space:
mode:
authorMarc-André Lureau <mlureau@flumotion.com>2010-07-28 16:15:53 +0200
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>2010-07-28 12:23:21 -0300
commit691901da51799cb04d17ed9ba94619bc7fd61f73 (patch)
treefb8978e1f7b1b47a11a400a6dc63299dca9690e0 /gst/qtmux
parent2e17f7cbf72014b7a5e2a5b115039213775af1b1 (diff)
downloadgstreamer-plugins-bad-691901da51799cb04d17ed9ba94619bc7fd61f73.tar.gz
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
Diffstat (limited to 'gst/qtmux')
-rw-r--r--gst/qtmux/gstqtmux.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gst/qtmux/gstqtmux.c b/gst/qtmux/gstqtmux.c
index 3b7d9472f..501da21a7 100644
--- a/gst/qtmux/gstqtmux.c
+++ b/gst/qtmux/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);