X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fqcp.c;h=c88c39b25dc7d1123470563e92d23a80326bddd1;hb=60fcc19bff49e0b1972eae014afc087afd94a415;hp=0f761a8ec1499da320bc13a0a7e92fe5ba64a0fa;hpb=7c1aba4f01a10915d356c7bc0c6bfed25cbb623e;p=ffmpeg diff --git a/libavformat/qcp.c b/libavformat/qcp.c index 0f761a8ec14..c88c39b25dc 100644 --- a/libavformat/qcp.c +++ b/libavformat/qcp.c @@ -84,7 +84,7 @@ static int qcp_read_header(AVFormatContext *s, AVFormatParameters *ap) { AVIOContext *pb = s->pb; QCPContext *c = s->priv_data; - AVStream *st = av_new_stream(s, 0); + AVStream *st = avformat_new_stream(s, NULL); uint8_t buf[16]; int i, nb_rates; @@ -92,8 +92,7 @@ static int qcp_read_header(AVFormatContext *s, AVFormatParameters *ap) return AVERROR(ENOMEM); avio_rb32(pb); // "RIFF" - s->file_size = avio_rl32(pb) + 8; - avio_skip(pb, 8 + 4 + 1 + 1); // "QLCMfmt " + chunk-size + major-version + minor-version + avio_skip(pb, 4 + 8 + 4 + 1 + 1); // filesize + "QLCMfmt " + chunk-size + major-version + minor-version st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->channels = 1;