forked from FFmpeg/FFmpeg
Do not access s->gb directly in functions that have a local copy of that
variable. See "[PATCH] asf.c: don't access AVFormatContext->pb" thread on ML. Originally committed as revision 16023 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
2ceccf045c
commit
022f0b7c01
1 changed files with 2 additions and 2 deletions
|
@ -567,7 +567,7 @@ static int asf_get_packet(AVFormatContext *s)
|
||||||
int rsize = 8;
|
int rsize = 8;
|
||||||
int c, d, e, off;
|
int c, d, e, off;
|
||||||
|
|
||||||
off= (url_ftell(s->pb) - s->data_offset) % asf->packet_size + 3;
|
off= (url_ftell(pb) - s->data_offset) % asf->packet_size + 3;
|
||||||
|
|
||||||
c=d=e=-1;
|
c=d=e=-1;
|
||||||
while(off-- > 0){
|
while(off-- > 0){
|
||||||
|
@ -723,7 +723,7 @@ static int asf_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||||
/* fail safe */
|
/* fail safe */
|
||||||
url_fskip(pb, ret);
|
url_fskip(pb, ret);
|
||||||
|
|
||||||
asf->packet_pos= url_ftell(s->pb);
|
asf->packet_pos= url_ftell(pb);
|
||||||
if (asf->data_object_size != (uint64_t)-1 &&
|
if (asf->data_object_size != (uint64_t)-1 &&
|
||||||
(asf->packet_pos - asf->data_object_offset >= asf->data_object_size))
|
(asf->packet_pos - asf->data_object_offset >= asf->data_object_size))
|
||||||
return AVERROR(EIO); /* Do not exceed the size of the data object */
|
return AVERROR(EIO); /* Do not exceed the size of the data object */
|
||||||
|
|
Loading…
Add table
Reference in a new issue