summaryrefslogtreecommitdiff
path: root/libavformat/segment.c
diff options
context:
space:
mode:
authorPierre-Anthony Lemieux <pal@palemieux.com>2022-08-06 16:35:19 -0700
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-12 18:54:19 +0200
commitf2403d1530aaf0b1a2f3833aaa6917e02ce147ac (patch)
treedb4135866f68ef61f194ef2d2b01fb188e185fb9 /libavformat/segment.c
parent7158f1e64d9b76afea78537a35c465447df0cff8 (diff)
downloadffmpeg-f2403d1530aaf0b1a2f3833aaa6917e02ce147ac.tar.gz
avformat: refactor ff_stream_encode_params_copy() to stream_params_copy()
Addresses http://ffmpeg.org/pipermail/ffmpeg-devel/2022-August/299726.html Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/segment.c')
-rw-r--r--libavformat/segment.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/segment.c b/libavformat/segment.c
index fa435d9f32..c904e20708 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -167,11 +167,9 @@ static int segment_mux_init(AVFormatContext *s)
AVStream *st, *ist = s->streams[i];
AVCodecParameters *ipar = ist->codecpar, *opar;
- if (!(st = avformat_new_stream(oc, NULL)))
+ st = ff_stream_clone(oc, ist);
+ if (!st)
return AVERROR(ENOMEM);
- ret = ff_stream_encode_params_copy(st, ist);
- if (ret < 0)
- return ret;
opar = st->codecpar;
if (!oc->oformat->codec_tag ||
av_codec_get_id (oc->oformat->codec_tag, ipar->codec_tag) == opar->codec_id ||