aboutsummaryrefslogtreecommitdiffstats
path: root/avconv.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-03-22 09:37:33 +0100
committerAnton Khirnov <anton@khirnov.net>2012-04-09 05:10:38 +0200
commit695ec04e6a142a12bf4c3acd8fd74c59a17e3934 (patch)
treeeeafffaa00835843470dddd913d7b4de194f209d /avconv.c
parent1337de0c4bea8bbf8e142e8401edd0b25dd059b5 (diff)
downloadffmpeg-695ec04e6a142a12bf4c3acd8fd74c59a17e3934.tar.gz
avconv: only set SAR once on the decoded frame.
No point in repeating the assignment for each output stream.
Diffstat (limited to 'avconv.c')
-rw-r--r--avconv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/avconv.c b/avconv.c
index 95dc8d8547..7fefec4c00 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1913,6 +1913,9 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
rate_emu_sleep(ist);
+ if (ist->st->sample_aspect_ratio.num)
+ decoded_frame->sample_aspect_ratio = ist->st->sample_aspect_ratio;
+
for (i = 0; i < nb_output_streams; i++) {
OutputStream *ost = &output_streams[i];
int frame_size, resample_changed;
@@ -1941,8 +1944,6 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
ost->resample_pix_fmt = decoded_frame->format;
}
- if (ist->st->sample_aspect_ratio.num)
- decoded_frame->sample_aspect_ratio = ist->st->sample_aspect_ratio;
if (ist->st->codec->codec->capabilities & CODEC_CAP_DR1) {
FrameBuffer *buf = decoded_frame->opaque;
AVFilterBufferRef *fb = avfilter_get_video_buffer_ref_from_arrays(