X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fvocdec.c;h=6b3438f758c946bb0a2181599b179fef38b7acca;hb=effe3b9575bf5770b228df37675a976a68e8a5e3;hp=d11e68c49f067dffc167b3a5c987b8db7e7afc9e;hpb=45a8a02a4151c9ff0d1161bf90bffcfbbb312fb8;p=ffmpeg diff --git a/libavformat/vocdec.c b/libavformat/vocdec.c index d11e68c49f0..6b3438f758c 100644 --- a/libavformat/vocdec.c +++ b/libavformat/vocdec.c @@ -2,20 +2,20 @@ * Creative Voice File demuxer. * Copyright (c) 2006 Aurelien Jacobs * - * This file is part of FFmpeg. + * This file is part of Libav. * - * FFmpeg is free software; you can redistribute it and/or + * Libav 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. * - * FFmpeg is distributed in the hope that it will be useful, + * Libav 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 FFmpeg; if not, write to the Free Software + * License along with Libav; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -38,7 +38,7 @@ static int voc_probe(AVProbeData *p) return AVPROBE_SCORE_MAX; } -static int voc_read_header(AVFormatContext *s, AVFormatParameters *ap) +static int voc_read_header(AVFormatContext *s) { VocDecContext *voc = s->priv_data; AVIOContext *pb = s->pb; @@ -52,7 +52,7 @@ static int voc_read_header(AVFormatContext *s, AVFormatParameters *ap) return AVERROR(ENOSYS); } avio_skip(pb, header_size); - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; @@ -78,7 +78,7 @@ voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size) return AVERROR(EIO); voc->remaining_size = avio_rl24(pb); if (!voc->remaining_size) { - if (url_is_streamed(s->pb)) + if (!s->pb->seekable) return AVERROR(EIO); voc->remaining_size = avio_size(pb) - avio_tell(pb); } @@ -157,11 +157,11 @@ static int voc_read_packet(AVFormatContext *s, AVPacket *pkt) } AVInputFormat ff_voc_demuxer = { - "voc", - NULL_IF_CONFIG_SMALL("Creative Voice file format"), - sizeof(VocDecContext), - voc_probe, - voc_read_header, - voc_read_packet, + .name = "voc", + .long_name = NULL_IF_CONFIG_SMALL("Creative Voice file format"), + .priv_data_size = sizeof(VocDecContext), + .read_probe = voc_probe, + .read_header = voc_read_header, + .read_packet = voc_read_packet, .codec_tag=(const AVCodecTag* const []){ff_voc_codec_tags, 0}, };