X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fqcp.c;h=c88c39b25dc7d1123470563e92d23a80326bddd1;hb=e098fba5d9c9d52aaddd83e63dd910ff20b841d2;hp=0f761a8ec1499da320bc13a0a7e92fe5ba64a0fa;hpb=eae3cf06a5410cf6d06235de4ceea28e33e53be3;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;