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 262b941241..5a9249ac4f 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 (avio_feof(pb))
return AVERROR_EOF;
sig = avio_rb32(pb);
@@ -158,11 +158,7 @@ static int smush_read_header(AVFormatContext *ctx)
vst->codecpar->height = height;
if (!smush->version) {
- av_free(vst->codecpar->extradata);
- vst->codecpar->extradata_size = 1024 + 2;
- vst->codecpar->extradata = av_malloc(vst->codecpar->extradata_size +
- AV_INPUT_BUFFER_PADDING_SIZE);
- if (!vst->codecpar->extradata)
+ if (ff_alloc_extradata(vst->codecpar, 1024 + 2))
return AVERROR(ENOMEM);
AV_WL16(vst->codecpar->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 (avio_feof(pb))
return AVERROR_EOF;
sig = avio_rb32(pb);