Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/webvttenc.c')
-rw-r--r--libavformat/webvttenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/webvttenc.c b/libavformat/webvttenc.c
index c386538718..4827de05d5 100644
--- a/libavformat/webvttenc.c
+++ b/libavformat/webvttenc.c
@@ -46,10 +46,10 @@ static void webvtt_write_time(AVIOContext *pb, int64_t millisec)
static int webvtt_write_header(AVFormatContext *ctx)
{
AVStream *s = ctx->streams[0];
- AVCodecContext *avctx = ctx->streams[0]->codec;
+ AVCodecParameters *par = ctx->streams[0]->codecpar;
AVIOContext *pb = ctx->pb;
- if (ctx->nb_streams != 1 || avctx->codec_id != AV_CODEC_ID_WEBVTT) {
+ if (ctx->nb_streams != 1 || par->codec_id != AV_CODEC_ID_WEBVTT) {
av_log(ctx, AV_LOG_ERROR, "Exactly one WebVTT stream is needed.\n");
return AVERROR(EINVAL);
}