mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
libavformat/westwood_audenc: Use proper logcontext
(AVStream did not have an AVClass when this muxer was added.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
eb3ee7f141
commit
b8124fe35e
@ -48,19 +48,19 @@ static int wsaud_write_init(AVFormatContext *ctx)
|
|||||||
|
|
||||||
/* Stream must be seekable to correctly write the file. */
|
/* Stream must be seekable to correctly write the file. */
|
||||||
if (!(pb->seekable & AVIO_SEEKABLE_NORMAL)) {
|
if (!(pb->seekable & AVIO_SEEKABLE_NORMAL)) {
|
||||||
av_log(ctx->streams[0], AV_LOG_ERROR, "Cannot write Westwood AUD to"
|
av_log(ctx, AV_LOG_ERROR, "Cannot write Westwood AUD to"
|
||||||
" non-seekable stream.\n");
|
" non-seekable stream.\n");
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (st->codecpar->codec_id != AV_CODEC_ID_ADPCM_IMA_WS) {
|
if (st->codecpar->codec_id != AV_CODEC_ID_ADPCM_IMA_WS) {
|
||||||
av_log(st, AV_LOG_ERROR, "%s codec not supported for Westwood AUD.\n",
|
av_log(ctx, AV_LOG_ERROR, "%s codec not supported for Westwood AUD.\n",
|
||||||
avcodec_get_name(st->codecpar->codec_id));
|
avcodec_get_name(st->codecpar->codec_id));
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx->nb_streams != 1) {
|
if (ctx->nb_streams != 1) {
|
||||||
av_log(st, AV_LOG_ERROR, "AUD files have exactly one stream\n");
|
av_log(ctx, AV_LOG_ERROR, "AUD files have exactly one stream\n");
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user