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:
authorJan Sebechlebsky <sebechlebskyjan@gmail.com>2016-07-04 17:45:10 +0300
committerMarton Balint <cus@passwd.hu>2016-07-16 02:15:16 +0300
commit3d7b5ad217e2643811f3042ef91de02f5543f221 (patch)
tree8cea1917f5de65aaffeac2b7c86ec555c66efbeb /libavformat/tee.c
parent1732d89403b724f56c1e35794c66890eeaf76341 (diff)
avformat/tee: Use ff_stream_encode_params_copy()
Use ff_stream_encode_params_copy() to copy encoding-related fields (parameters) of stream. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat/tee.c')
-rw-r--r--libavformat/tee.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/libavformat/tee.c b/libavformat/tee.c
index 9d0a4cb39e..c276a37a28 100644
--- a/libavformat/tee.c
+++ b/libavformat/tee.c
@@ -294,17 +294,9 @@ static int open_slave(AVFormatContext *avf, char *slave, TeeSlave *tee_slave)
ret = AVERROR(ENOMEM);
goto end;
}
- st2->id = st->id;
- st2->r_frame_rate = st->r_frame_rate;
- st2->time_base = st->time_base;
- st2->start_time = st->start_time;
- st2->duration = st->duration;
- st2->nb_frames = st->nb_frames;
- st2->disposition = st->disposition;
- st2->sample_aspect_ratio = st->sample_aspect_ratio;
- st2->avg_frame_rate = st->avg_frame_rate;
- av_dict_copy(&st2->metadata, st->metadata, 0);
- if ((ret = avcodec_parameters_copy(st2->codecpar, st->codecpar)) < 0)
+
+ ret = ff_stream_encode_params_copy(st2, st);
+ if (ret < 0)
goto end;
}