summaryrefslogtreecommitdiff
path: root/libavformat/lrcenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/lrcenc.c')
-rw-r--r--libavformat/lrcenc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/lrcenc.c b/libavformat/lrcenc.c
index 74268cc681..c5fda64738 100644
--- a/libavformat/lrcenc.c
+++ b/libavformat/lrcenc.c
@@ -39,15 +39,15 @@ static int lrc_write_header(AVFormatContext *s)
const AVDictionaryEntry *metadata_item;
if(s->nb_streams != 1 ||
- s->streams[0]->codec->codec_type != AVMEDIA_TYPE_SUBTITLE) {
+ s->streams[0]->codecpar->codec_type != AVMEDIA_TYPE_SUBTITLE) {
av_log(s, AV_LOG_ERROR,
"LRC supports only a single subtitle stream.\n");
return AVERROR(EINVAL);
}
- if(s->streams[0]->codec->codec_id != AV_CODEC_ID_SUBRIP &&
- s->streams[0]->codec->codec_id != AV_CODEC_ID_TEXT) {
+ if(s->streams[0]->codecpar->codec_id != AV_CODEC_ID_SUBRIP &&
+ s->streams[0]->codecpar->codec_id != AV_CODEC_ID_TEXT) {
av_log(s, AV_LOG_ERROR, "Unsupported subtitle codec: %s\n",
- avcodec_get_name(s->streams[0]->codec->codec_id));
+ avcodec_get_name(s->streams[0]->codecpar->codec_id));
return AVERROR(EINVAL);
}
avpriv_set_pts_info(s->streams[0], 64, 1, 100);