mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
gst/avi/gstavidemux.c: Fix potential division by zero error and hopefully get the position query right to get correct...
Original commit message from CVS: * gst/avi/gstavidemux.c: (gst_avi_demux_handle_src_query): Fix potential division by zero error and hopefully get the position query right to get correct timestamps on avi audio.
This commit is contained in:
parent
a6e2d4002b
commit
712347f136
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2004-05-24 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* gst/avi/gstavidemux.c: (gst_avi_demux_handle_src_query):
|
||||||
|
Fix potential division by zero error and hopefully get
|
||||||
|
the position query right to get correct timestamps on avi
|
||||||
|
audio.
|
||||||
|
|
||||||
2004-05-24 Wim Taymans <wim@fluendo.com>
|
2004-05-24 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* gst/videoscale/videoscale.c: (gst_videoscale_scale_nearest),
|
* gst/videoscale/videoscale.c: (gst_videoscale_scale_nearest),
|
||||||
|
|
|
@ -439,8 +439,7 @@ gst_avi_demux_handle_src_query (GstPad * pad,
|
||||||
case GST_QUERY_POSITION:
|
case GST_QUERY_POSITION:
|
||||||
switch (*format) {
|
switch (*format) {
|
||||||
case GST_FORMAT_TIME:
|
case GST_FORMAT_TIME:
|
||||||
if (stream->strh->samplesize &&
|
if (stream->strh->rate && stream->strh->type == GST_RIFF_FCC_auds) {
|
||||||
stream->strh->type == GST_RIFF_FCC_auds) {
|
|
||||||
*value = ((gfloat) stream->current_byte) * GST_SECOND /
|
*value = ((gfloat) stream->current_byte) * GST_SECOND /
|
||||||
stream->strh->rate;
|
stream->strh->rate;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue