On Tue, 3 Apr 2012, Anton Khirnov wrote:

No point in repeating the assignment for each output stream.
---
avconv.c |    5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/avconv.c b/avconv.c
index d3dba74..15c0c38 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1914,6 +1914,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;
@@ -1942,8 +1945,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(
--
1.7.9.1

Looks sensible enough to me, I assume there's nothing that changes it between the loop iterations?

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to