aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-09-14 21:57:24 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-09-14 21:57:47 +0200
commit3ee83f46058449913abeca7ba82e8e2909828209 (patch)
tree20d83fc9cb70dfc35d7574e2cd59e62806fe6e07
parent205c13685f36a17f406b7cd07e14b6d2a61f396a (diff)
parent940173d4d1e40b025f0ac15f2572eef537fb1186 (diff)
downloadffmpeg-3ee83f46058449913abeca7ba82e8e2909828209.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: lavf utils: Remove write-only variable lavf utils: Rename shadowing variable smacker: fix a few off by 1 errors Check for invalid VLC value in smacker decoder. Check and propagate errors when VLC trees cannot be built in smacker decoder. Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/utils.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 8138069bfd..916624e20d 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1742,7 +1742,6 @@ static int seek_frame_generic(AVFormatContext *s,
return -1;
if(index < 0 || index==st->nb_index_entries-1){
- int i;
AVPacket pkt;
if(st->nb_index_entries){
@@ -1755,12 +1754,12 @@ static int seek_frame_generic(AVFormatContext *s,
if ((ret = avio_seek(s->pb, s->data_offset, SEEK_SET)) < 0)
return ret;
}
- for(i=0;; i++) {
- int ret;
+ for (;;) {
+ int read_status;
do{
- ret = av_read_frame(s, &pkt);
- }while(ret == AVERROR(EAGAIN));
- if(ret<0)
+ read_status = av_read_frame(s, &pkt);
+ } while (read_status == AVERROR(EAGAIN));
+ if (read_status < 0)
break;
av_free_packet(&pkt);
if(stream_index == pkt.stream_index){