Commit 3d7b5ad2 authored by Jan Sebechlebsky's avatar Jan Sebechlebsky Committed by Marton Balint

avformat/tee: Use ff_stream_encode_params_copy()

Use ff_stream_encode_params_copy() to copy encoding-related
fields (parameters) of stream.
Reviewed-by: 's avatarNicolas George <george@nsup.org>
Signed-off-by: 's avatarJan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 1732d894
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment