Commit bd36f175 authored by Reimar Döffinger's avatar Reimar Döffinger

Make pcm_read_seek treat negative time stamps as 0, this avoids incorrectly

seeking before data_offset and is more consistent with how the generic index
seeking code handles it.

Originally committed as revision 17964 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 2f2cabef
......@@ -232,6 +232,7 @@ int pcm_read_seek(AVFormatContext *s,
if (block_align <= 0 || byte_rate <= 0)
return -1;
if (timestamp < 0) timestamp = 0;
/* compute the position by aligning it to block_align */
pos = av_rescale_rnd(timestamp * byte_rate,
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment