diff options
Diffstat (limited to 'libavformat/srtenc.c')
-rw-r--r-- | libavformat/srtenc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/srtenc.c b/libavformat/srtenc.c index 24c25ec643..d811a4da0e 100644 --- a/libavformat/srtenc.c +++ b/libavformat/srtenc.c @@ -39,16 +39,16 @@ static int srt_write_header(AVFormatContext *avf) SRTContext *srt = avf->priv_data; if (avf->nb_streams != 1 || - avf->streams[0]->codec->codec_type != AVMEDIA_TYPE_SUBTITLE) { + avf->streams[0]->codecpar->codec_type != AVMEDIA_TYPE_SUBTITLE) { av_log(avf, AV_LOG_ERROR, "SRT supports only a single subtitles stream.\n"); return AVERROR(EINVAL); } - if (avf->streams[0]->codec->codec_id != AV_CODEC_ID_TEXT && - avf->streams[0]->codec->codec_id != AV_CODEC_ID_SUBRIP) { + if (avf->streams[0]->codecpar->codec_id != AV_CODEC_ID_TEXT && + avf->streams[0]->codecpar->codec_id != AV_CODEC_ID_SUBRIP) { av_log(avf, AV_LOG_ERROR, "Unsupported subtitles codec: %s\n", - avcodec_get_name(avf->streams[0]->codec->codec_id)); + avcodec_get_name(avf->streams[0]->codecpar->codec_id)); return AVERROR(EINVAL); } avpriv_set_pts_info(avf->streams[0], 64, 1, 1000); |