diff options
Diffstat (limited to 'libavformat/hlsenc.c')
-rw-r--r-- | libavformat/hlsenc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 843f37d82c..96b780fe37 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -82,7 +82,7 @@ static int hls_mux_init(AVFormatContext *s) AVStream *st; if (!(st = avformat_new_stream(oc, NULL))) return AVERROR(ENOMEM); - avcodec_copy_context(st->codec, s->streams[i]->codec); + avcodec_parameters_copy(st->codecpar, s->streams[i]->codecpar); st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio; st->time_base = s->streams[i]->time_base; } @@ -220,7 +220,7 @@ static int hls_write_header(AVFormatContext *s) for (i = 0; i < s->nb_streams; i++) hls->has_video += - s->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO; + s->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO; if (hls->has_video > 1) av_log(s, AV_LOG_WARNING, @@ -284,7 +284,7 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt) } if (hls->has_video) { - can_split = st->codec->codec_type == AVMEDIA_TYPE_VIDEO && + can_split = st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && pkt->flags & AV_PKT_FLAG_KEY; } if (pkt->pts == AV_NOPTS_VALUE) |