diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-03-14 20:50:54 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-03-14 20:50:54 +0000 |
commit | bd36f175ab902fb6f1554ca3b4d9181228d628a3 (patch) | |
tree | b52d4e126b3fe04478d8b630509f8e68a4fd6ac3 /libavformat/raw.c | |
parent | 2f2cabef9ca3d087588cdaa83f29cf5e34bda03e (diff) | |
download | ffmpeg-bd36f175ab902fb6f1554ca3b4d9181228d628a3.tar.gz |
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
Diffstat (limited to 'libavformat/raw.c')
-rw-r--r-- | libavformat/raw.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/raw.c b/libavformat/raw.c index 224c26f3ed..ba73dca455 100644 --- a/libavformat/raw.c +++ b/libavformat/raw.c @@ -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, |