ext/mad/gstmad.c: When handling seeks, don't convert -1 start or stop values to a bogus byte position - pass them ups...

Original commit message from CVS:
* ext/mad/gstmad.c: (gst_mad_convert_sink), (gst_mad_convert_src):
When handling seeks, don't convert -1 start or stop values to a bogus
byte position - pass them upstream as -1.
This commit is contained in:
Jan Schmidt 2007-03-12 17:26:13 +00:00
parent c5ff02937b
commit b3bed8b0da
2 changed files with 18 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2007-03-12 Jan Schmidt <thaytan@mad.scientist.com>
* ext/mad/gstmad.c: (gst_mad_convert_sink), (gst_mad_convert_src):
When handling seeks, don't convert -1 start or stop values to a bogus
byte position - pass them upstream as -1.
2007-03-12 Jan Schmidt <thaytan@mad.scientist.com>
* gst/mpegaudioparse/gstmpegaudioparse.c:

View file

@ -396,6 +396,12 @@ gst_mad_convert_sink (GstPad * pad, GstFormat src_format, gint64 src_value,
return TRUE;
}
/* -1 always maps to -1, and 0 to 0, we don't need any more info for that */
if (src_value == -1 || src_value == 0) {
*dest_value = src_value;
return TRUE;
}
mad = GST_MAD (GST_PAD_PARENT (pad));
if (mad->vbr_average == 0)
@ -444,6 +450,12 @@ gst_mad_convert_src (GstPad * pad, GstFormat src_format, gint64 src_value,
return TRUE;
}
/* -1 always maps to -1, and 0 to 0, we don't need any more info for that */
if (src_value == -1 || src_value == 0) {
*dest_value = src_value;
return TRUE;
}
mad = GST_MAD (GST_PAD_PARENT (pad));
bytes_per_sample = MAD_NCHANNELS (&mad->frame.header) * 4;