You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
Merge commit '538bf767373f176b6487e30181155e74b37cced6'
* commit '538bf767373f176b6487e30181155e74b37cced6': avconv: make -aspect work with streamcopy Conflicts: ffmpeg.c ffmpeg_opt.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
15
ffmpeg.c
15
ffmpeg.c
@@ -2117,6 +2117,7 @@ static int transcode_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ost->stream_copy) {
|
if (ost->stream_copy) {
|
||||||
|
AVRational sar;
|
||||||
uint64_t extra_size;
|
uint64_t extra_size;
|
||||||
|
|
||||||
av_assert0(ist && !ost->filter);
|
av_assert0(ist && !ost->filter);
|
||||||
@@ -2225,19 +2226,17 @@ static int transcode_init(void)
|
|||||||
codec->height = icodec->height;
|
codec->height = icodec->height;
|
||||||
codec->has_b_frames = icodec->has_b_frames;
|
codec->has_b_frames = icodec->has_b_frames;
|
||||||
if (ost->frame_aspect_ratio.num) { // overridden by the -aspect cli option
|
if (ost->frame_aspect_ratio.num) { // overridden by the -aspect cli option
|
||||||
codec->sample_aspect_ratio =
|
sar =
|
||||||
ost->st->sample_aspect_ratio =
|
|
||||||
av_mul_q(ost->frame_aspect_ratio,
|
av_mul_q(ost->frame_aspect_ratio,
|
||||||
(AVRational){ codec->height, codec->width });
|
(AVRational){ codec->height, codec->width });
|
||||||
av_log(NULL, AV_LOG_WARNING, "Overriding aspect ratio "
|
av_log(NULL, AV_LOG_WARNING, "Overriding aspect ratio "
|
||||||
"with stream copy may produce invalid files\n");
|
"with stream copy may produce invalid files\n");
|
||||||
} else if (!codec->sample_aspect_ratio.num) {
|
|
||||||
codec->sample_aspect_ratio =
|
|
||||||
ost->st->sample_aspect_ratio =
|
|
||||||
ist->st->sample_aspect_ratio.num ? ist->st->sample_aspect_ratio :
|
|
||||||
ist->st->codec->sample_aspect_ratio.num ?
|
|
||||||
ist->st->codec->sample_aspect_ratio : (AVRational){0, 1};
|
|
||||||
}
|
}
|
||||||
|
else if (ist->st->sample_aspect_ratio.num)
|
||||||
|
sar = ist->st->sample_aspect_ratio;
|
||||||
|
else
|
||||||
|
sar = icodec->sample_aspect_ratio;
|
||||||
|
ost->st->sample_aspect_ratio = codec->sample_aspect_ratio = sar;
|
||||||
ost->st->avg_frame_rate = ist->st->avg_frame_rate;
|
ost->st->avg_frame_rate = ist->st->avg_frame_rate;
|
||||||
break;
|
break;
|
||||||
case AVMEDIA_TYPE_SUBTITLE:
|
case AVMEDIA_TYPE_SUBTITLE:
|
||||||
|
Reference in New Issue
Block a user