[MPlayer-dev-eng] [PATCH] support AVSEEK_SIZE for demux_lavf.c

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Aug 19 23:28:30 CEST 2007


Hello,
does this patch look right to you?
And I also think that the whence == SEEK_END case should check for
stream->end_pos being valid (i.e. > 0), okay to apply such a change as
well?

Index: libmpdemux/demux_lavf.c
===================================================================
--- libmpdemux/demux_lavf.c     (revision 24102)
+++ libmpdemux/demux_lavf.c     (working copy)
@@ -145,6 +145,8 @@
         pos += stream->end_pos;
     else if(whence == SEEK_SET)
         pos += stream->start_pos;
+    else if(whence == AVSEEK_SIZE && stream->end_pos > 0)
+        return stream->end_pos - stream->start_pos;
     else
         return -1;
 




More information about the MPlayer-dev-eng mailing list