Lines Matching defs:ctx
33 static av_cold int wv_init(AVFormatContext *ctx)
35 if (ctx->nb_streams > 1 ||
36 ctx->streams[0]->codecpar->codec_id != AV_CODEC_ID_WAVPACK) {
37 av_log(ctx, AV_LOG_ERROR, "This muxer only supports a single WavPack stream.\n");
44 static int wv_write_packet(AVFormatContext *ctx, AVPacket *pkt)
46 WvMuxContext *s = ctx->priv_data;
52 av_log(ctx, AV_LOG_ERROR, "Invalid WavPack packet.\n");
57 avio_write(ctx->pb, pkt->data, pkt->size);
62 static av_cold int wv_write_trailer(AVFormatContext *ctx)
64 WvMuxContext *s = ctx->priv_data;
67 if ((ctx->pb->seekable & AVIO_SEEKABLE_NORMAL) && s->samples &&
69 int64_t pos = avio_tell(ctx->pb);
70 avio_seek(ctx->pb, 12, SEEK_SET);
71 avio_wl32(ctx->pb, s->samples);
72 avio_seek(ctx->pb, pos, SEEK_SET);
75 ff_ape_write_tag(ctx);