changeset 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 2f7b32083fb0
children 5de2c153566b
files raw.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
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,