diff raw.c @ 4710:430cf07e7203 libavformat

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.
author reimar
date Sat, 14 Mar 2009 20:50:54 +0000
parents 290808c90f82
children ffb7e8093289
line wrap: on
line diff
--- a/raw.c	Sat Mar 14 16:30:51 2009 +0000
+++ b/raw.c	Sat Mar 14 20:50:54 2009 +0000
@@ -232,6 +232,7 @@
 
     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,