Merge commit '0662967d2bbdbe90540eaa8c847f521fa4b75aab' into release/1.1
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 12 May 2013 12:24:09 +0000 (14:24 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 12 May 2013 12:25:50 +0000 (14:25 +0200)
* commit '0662967d2bbdbe90540eaa8c847f521fa4b75aab':
  hls, segment: fix splitting for audio-only streams.
  afifo: fix request_samples on the last frame in certain cases
  id3v2: check for end of file while unescaping tags
  indeo3: fix off by one in MV validity check

Conflicts:
libavformat/id3v2.c
libavformat/segment.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/indeo3.c
libavfilter/fifo.c
libavformat/hlsenc.c
libavformat/id3v2.c

Simple merge
Simple merge
Simple merge
@@@ -699,15 -625,11 +699,17 @@@ static void ff_id3v2_parse(AVFormatCont
                      av_log(s, AV_LOG_ERROR, "Failed to alloc %d bytes\n", tlen);
                      goto seek;
                  }
 +            }
 +            if (unsync || tunsync) {
 +                int64_t end = avio_tell(s->pb) + tlen;
 +                uint8_t *b;
 +
                  b = buffer;
-                 while (avio_tell(s->pb) < end && b - buffer < tlen) {
 -                while (avio_tell(s->pb) < end && !s->pb->eof_reached) {
++                while (avio_tell(s->pb) < end && b - buffer < tlen && !s->pb->eof_reached) {
                      *b++ = avio_r8(s->pb);
-                     if (*(b - 1) == 0xff && avio_tell(s->pb) < end - 1 && b - buffer < tlen) {
+                     if (*(b - 1) == 0xff && avio_tell(s->pb) < end - 1 &&
++                        b - buffer < tlen &&
+                         !s->pb->eof_reached ) {
                          uint8_t val = avio_r8(s->pb);
                          *b++ = val ? val : avio_r8(s->pb);
                      }