diff options
author | Thomas Vander Stichele <thomas (at) apestaart (dot) org> | 2009-06-01 22:33:02 +0200 |
---|---|---|
committer | Thomas Vander Stichele <thomas (at) apestaart (dot) org> | 2009-06-01 22:33:02 +0200 |
commit | 0de1f5357d2522323071d698ff7c588d16ced601 (patch) | |
tree | c10c34e984a194659728d5afadad4fb490567e25 /ext | |
parent | 09fbeee42d4ce76840d144a5eb03a9192fc1f4dd (diff) |
Address bad FLAC sample length encoding of #5844455
Commit df707c666433a78d3878af6f055698d5756226c4
introduced an obvious bug in the sample length calculation,
using the wrong macro for conversion.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/flac/gstflacenc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/flac/gstflacenc.c b/ext/flac/gstflacenc.c index 97b9f3db..cf5afcd3 100644 --- a/ext/flac/gstflacenc.c +++ b/ext/flac/gstflacenc.c @@ -559,15 +559,19 @@ gst_flac_enc_query_peer_total_samples (GstFlacEnc * flacenc, GstPad * pad) GstFormat fmt = GST_FORMAT_DEFAULT; gint64 duration; + GST_DEBUG_OBJECT (flacenc, "querying peer for DEFAULT format duration"); if (gst_pad_query_peer_duration (pad, &fmt, &duration) && fmt == GST_FORMAT_DEFAULT && duration != GST_CLOCK_TIME_NONE) goto done; fmt = GST_FORMAT_TIME; + GST_DEBUG_OBJECT (flacenc, "querying peer for TIME format duration"); if (gst_pad_query_peer_duration (pad, &fmt, &duration) && fmt == GST_FORMAT_TIME && duration != GST_CLOCK_TIME_NONE) { - duration = GST_FRAMES_TO_CLOCK_TIME (duration, flacenc->sample_rate); + GST_DEBUG_OBJECT (flacenc, "peer reported duration %" GST_TIME_FORMAT, + GST_TIME_ARGS (duration)); + duration = GST_CLOCK_TIME_TO_FRAMES (duration, flacenc->sample_rate); goto done; } |