From fae42be53d893e95e55e236c111bd5a57921aca4 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 6 Oct 2005 13:14:38 +0000 Subject: [PATCH] ext/amrnb/amrnbdec.c: Mark invalid frame sizes Original commit message from CVS: * ext/amrnb/amrnbdec.c: Mark invalid frame sizes * ext/mad/gstmad.c: (gst_mad_init), (gst_mad_chain): UNUSABLE is not to be used here, just push out stuff so probes can continue linking or making the pad usable. --- ChangeLog | 9 +++++++++ ext/amrnb/amrnbdec.c | 2 +- ext/mad/gstmad.c | 16 ++++------------ 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 76be513..624dd52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-10-06 Wim Taymans + + * ext/amrnb/amrnbdec.c: + Mark invalid frame sizes + + * ext/mad/gstmad.c: (gst_mad_init), (gst_mad_chain): + UNUSABLE is not to be used here, just push out stuff so + probes can continue linking or making the pad usable. + 2005-10-05 Michael Smith * gst/realmedia/rmdemux.c: (gst_rmdemux_sink_event), diff --git a/ext/amrnb/amrnbdec.c b/ext/amrnb/amrnbdec.c index 169f8e0..9980de1 100644 --- a/ext/amrnb/amrnbdec.c +++ b/ext/amrnb/amrnbdec.c @@ -41,7 +41,7 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", ); static const gint block_size[16] = { 12, 13, 15, 17, 19, 20, 26, 31, 5, - 0, 0, 0, 0, 0, 0, 0 + -1, -1, -1, -1, -1, -1, 0 }; static void gst_amrnbdec_base_init (GstAmrnbDecClass * klass); diff --git a/ext/mad/gstmad.c b/ext/mad/gstmad.c index 681bd80..216306f 100644 --- a/ext/mad/gstmad.c +++ b/ext/mad/gstmad.c @@ -346,6 +346,7 @@ gst_mad_init (GstMad * mad) GST_DEBUG_FUNCPTR (gst_mad_src_query)); gst_pad_set_query_type_function (mad->srcpad, GST_DEBUG_FUNCPTR (gst_mad_get_query_types)); + gst_pad_use_fixed_caps (mad->srcpad); #if 0 gst_pad_set_convert_function (mad->srcpad, GST_DEBUG_FUNCPTR (gst_mad_convert_src)); @@ -1364,11 +1365,7 @@ gst_mad_chain (GstPad * pad, GstBuffer * buffer) } else { mad->tags = gst_tag_list_copy (list); } - if (GST_PAD_IS_USABLE (mad->srcpad)) { - gst_pad_push_event (mad->srcpad, gst_event_new_tag (list)); - } else { - gst_tag_list_free (list); - } + gst_pad_push_event (mad->srcpad, gst_event_new_tag (list)); } } } @@ -1406,11 +1403,7 @@ gst_mad_chain (GstPad * pad, GstBuffer * buffer) GST_TAG_BITRATE, bitrate, NULL); gst_element_post_message (GST_ELEMENT (mad), gst_message_new_tag (GST_OBJECT (mad), gst_tag_list_copy (list))); - if (GST_PAD_IS_USABLE (mad->srcpad)) { - gst_pad_push_event (mad->srcpad, gst_event_new_tag (list)); - } else { - gst_tag_list_free (list); - } + gst_pad_push_event (mad->srcpad, gst_event_new_tag (list)); } mad->check_for_xing = FALSE; @@ -1450,8 +1443,7 @@ gst_mad_chain (GstPad * pad, GstBuffer * buffer) GST_FORMAT_BYTES, x_bytes, GST_FORMAT_TIME, time_offset, NULL); } - if (GST_PAD_IS_USABLE (mad->srcpad) && - mad->segment_start <= (time_offset == + if (mad->segment_start <= (time_offset == GST_CLOCK_TIME_NONE ? 0 : time_offset)) { /* for sample accurate seeking, calculate how many samples -- 2.7.4