[Ffmpeg-cvslog] CVS: ffmpeg/libavformat asf.c,1.82,1.83
Michael Niedermayer CVS
michael
Wed Jul 27 09:31:43 CEST 2005
Update of /cvsroot/ffmpeg/ffmpeg/libavformat
In directory mail:/var2/tmp/cvs-serv11946
Modified Files:
asf.c
Log Message:
round pointer up to next packet_size multiple
Index: asf.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/asf.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- asf.c 17 Jul 2005 22:24:35 -0000 1.82
+++ asf.c 27 Jul 2005 07:31:40 -0000 1.83
@@ -422,8 +422,6 @@
int rsize = 9;
int c;
- if((url_ftell(&s->pb) - s->data_offset) % asf->packet_size)
- return -1;
assert((url_ftell(&s->pb) - s->data_offset) % asf->packet_size == 0);
c = get_byte(pb);
@@ -485,6 +483,8 @@
//asf->packet_size_left <= asf->packet_padsize) {
int ret = asf->packet_size_left + asf->packet_padsize;
//printf("PacketLeftSize:%d Pad:%d Pos:%Ld\n", asf->packet_size_left, asf->packet_padsize, url_ftell(pb));
+ if((url_ftell(&s->pb) + ret - s->data_offset) % asf->packet_size)
+ ret += asf->packet_size - ((url_ftell(&s->pb) + ret - s->data_offset) % asf->packet_size);
/* fail safe */
url_fskip(pb, ret);
asf->packet_pos= url_ftell(&s->pb);
More information about the ffmpeg-cvslog
mailing list