summaryrefslogtreecommitdiff
path: root/libavformat/smush.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/smush.c')
-rw-r--r--libavformat/smush.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/libavformat/smush.c b/libavformat/smush.c
index 1615b45417..a33d50915a 100644
--- a/libavformat/smush.c
+++ b/libavformat/smush.c
@@ -2,20 +2,20 @@
* LucasArts Smush demuxer
* Copyright (c) 2006 Cyril Zorin
*
- * 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
*/
@@ -102,7 +102,7 @@ static int smush_read_header(AVFormatContext *ctx)
while (!got_audio && ((read + 8) < size)) {
uint32_t sig, chunk_size;
- if (pb->eof_reached)
+ if (url_feof(pb))
return AVERROR_EOF;
sig = avio_rb32(pb);
@@ -158,11 +158,7 @@ static int smush_read_header(AVFormatContext *ctx)
vst->codec->height = height;
if (!smush->version) {
- av_free(vst->codec->extradata);
- vst->codec->extradata_size = 1024 + 2;
- vst->codec->extradata = av_malloc(vst->codec->extradata_size +
- FF_INPUT_BUFFER_PADDING_SIZE);
- if (!vst->codec->extradata)
+ if (ff_alloc_extradata(vst->codec, 1024 + 2))
return AVERROR(ENOMEM);
AV_WL16(vst->codec->extradata, subversion);
@@ -200,7 +196,7 @@ static int smush_read_packet(AVFormatContext *ctx, AVPacket *pkt)
while (!done) {
uint32_t sig, size;
- if (pb->eof_reached)
+ if (url_feof(pb))
return AVERROR_EOF;
sig = avio_rb32(pb);