]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mxg.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavformat / mxg.c
index 3f8c3e339e49b8f3aac753d194e878568bcedee7..32ca2750cb5ca9ac50c2981fc263032efa1a5aff 100644 (file)
@@ -2,20 +2,20 @@
  * MxPEG clip file demuxer
  * Copyright (c) 2010 Anatoly Nenashev
  *
- * This file is part of Libav.
+ * This file is part of FFmpeg.
  *
- * Libav is free software; you can redistribute it and/or
+ * FFmpeg is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
- * Libav is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
@@ -104,7 +104,7 @@ static int mxg_update_cache(AVFormatContext *s, unsigned int cache_size)
     /* reallocate internal buffer */
     if (current_pos > current_pos + cache_size)
         return AVERROR(ENOMEM);
-    if (mxg->soi_ptr) soi_pos = mxg->soi_ptr - mxg->buffer;
+    soi_pos = mxg->soi_ptr - mxg->buffer;
     mxg->buffer = av_fast_realloc(mxg->buffer, &mxg->buffer_size,
                                   current_pos + cache_size +
                                   FF_INPUT_BUFFER_PADDING_SIZE);
@@ -131,7 +131,7 @@ static int mxg_read_packet(AVFormatContext *s, AVPacket *pkt)
     uint8_t *startmarker_ptr, *end, *search_end, marker;
     MXGContext *mxg = s->priv_data;
 
-    while (!s->pb->eof_reached && !s->pb->error){
+    while (!url_feof(s->pb) && !s->pb->error){
         if (mxg->cache_size <= OVERREAD_SIZE) {
             /* update internal buffer */
             ret = mxg_update_cache(s, DEFAULT_PACKET_SIZE + OVERREAD_SIZE);