X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fwc3movie.c;h=8bba572f4eaf67ebd44ce31d250310297a69d166;hb=876d1d796bd80c75e3e6a7a458e3143cfe5c9474;hp=e57a9bf84418979bf13a5802c328b7585bd0fb4a;hpb=d2d67e424fa10d883e13709095c80bd3b502ce03;p=ffmpeg diff --git a/libavformat/wc3movie.c b/libavformat/wc3movie.c index e57a9bf8441..8bba572f4ea 100644 --- a/libavformat/wc3movie.c +++ b/libavformat/wc3movie.c @@ -2,20 +2,20 @@ * Wing Commander III Movie (.mve) File Demuxer * Copyright (c) 2003 The ffmpeg Project * - * 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 */ @@ -152,13 +152,12 @@ static int wc3_read_header(AVFormatContext *s, (uint8_t)fourcc_tag, (uint8_t)(fourcc_tag >> 8), (uint8_t)(fourcc_tag >> 16), (uint8_t)(fourcc_tag >> 24), (uint8_t)fourcc_tag, (uint8_t)(fourcc_tag >> 8), (uint8_t)(fourcc_tag >> 16), (uint8_t)(fourcc_tag >> 24)); return AVERROR_INVALIDDATA; - break; } fourcc_tag = avio_rl32(pb); /* chunk sizes are 16-bit aligned */ size = (avio_rb32(pb) + 1) & (~1); - if (pb->eof_reached) + if (url_feof(pb)) return AVERROR(EIO); } while (fourcc_tag != BRCH_TAG); @@ -209,7 +208,7 @@ static int wc3_read_packet(AVFormatContext *s, fourcc_tag = avio_rl32(pb); /* chunk sizes are 16-bit aligned */ size = (avio_rb32(pb) + 1) & (~1); - if (pb->eof_reached) + if (url_feof(pb)) return AVERROR(EIO); switch (fourcc_tag) { @@ -293,11 +292,11 @@ static int wc3_read_close(AVFormatContext *s) } AVInputFormat ff_wc3_demuxer = { - "wc3movie", - NULL_IF_CONFIG_SMALL("Wing Commander III movie format"), - sizeof(Wc3DemuxContext), - wc3_probe, - wc3_read_header, - wc3_read_packet, - wc3_read_close, + .name = "wc3movie", + .long_name = NULL_IF_CONFIG_SMALL("Wing Commander III movie format"), + .priv_data_size = sizeof(Wc3DemuxContext), + .read_probe = wc3_probe, + .read_header = wc3_read_header, + .read_packet = wc3_read_packet, + .read_close = wc3_read_close, };