Since the segment duration is given in terms of the
GST_MATROSKA_ID_TIMECODESCALE we should only convert it into
nanoseconds when we are sure that any scale specified in the file has
been read.
https://bugzilla.gnome.org/show_bug.cgi?id=650258
Otherwise wavenc will fail if upstream decides to set equivalent caps or caps
with additional information later.
Thanks to Alexander Schremmer for finding this bug.
A duration tag gets inserted only for streamable=false, so only
update/write the duration later if we actually inserted that tag,
otherwise we write garbage into other tags.
https://bugzilla.gnome.org/show_bug.cgi?id=649060
Refuse h264 caps without stream-format and codec_data fields for
now, to avoid creating broken files. This might cause some pipelines
that worked previously to fail. However, the move from -bad to -good
is our only chance to fix this up, so make it strict for now. We can
always change it back to be less strict in future.
https://bugzilla.gnome.org/show_bug.cgi?id=647919
Don't use g_assert() for error handling, even if they're highly unlikely.
Either we *know* that something can't happen, in which case we
should just not handle it, or we think something can happen, but it is
very very unlikely that it will ever happen, in which case we should
handle it like any other error instead of asserting.
g_assert() is best left for conditions we have control of, like checking
internal consistency of our code, not checking return values of external
code.
Fixes a bunch of warnings when compiling with -DG_DISABLE_ASSERT:
gstrtpgsmpay.c: In function 'gst_rtp_gsm_pay_handle_buffer':
gstrtpgsmpay.c:130:17: warning: variable 'rtpgsmpay' set but not used
gstspeexenc.c: In function 'gst_speex_enc_encode':
gstspeexenc.c:904:19: warning: variable 'written' set but not used
pulsesink.c: In function 'gst_pulsesink_change_state':
pulsesink.c:2725:9: warning: variable 'res' set but not used
pulsesrc.c: In function 'gst_pulsesrc_change_state':
pulsesrc.c:1253:7: warning: variable 'e' set but not used
We use -DG_DISABLE_ASSERT for the pre-releases, which makes these
warnings pop up in cases that were previously covered by g_assert_not_reached()
and the like:
tvtime/greedyh.c:801:14: warning: 'scanline' may be used uninitialized in this function
matroska-mux.c:501:19: warning: 'context' may be used uninitialized in this function
GCC 4.6.x spits warnings about variables that are unused but set. Such
variables have been removed where trivial but with comments left behind
for informational purposes in some cases.
gst_rtp_session_chain_recv_rtcp () was changed in commit 490113d4
to always return GST_FLOW_OK instead of the return value of
rtp_session_process_rtcp (), so we'll keep it that way.