Ticket #887: 0001-Patch-for-assertion-error-in-swresample.c.-Fiexes-bu.patch

File 0001-Patch-for-assertion-error-in-swresample.c.-Fiexes-bu.patch, 1.1 KB (added by Oana Stratulat, 15 years ago)

Patch for this bug.

  • ffmpeg.c

    From 8499dee86f9955d8c2cfb2fe53212d22560c3de9 Mon Sep 17 00:00:00 2001
    From: Oana Stratulat <oanaandreeastratulat@gmail.com>
    Date: Fri, 6 Jan 2012 02:33:23 +0200
    Subject: [PATCH] Patch for assertion error in swresample.c. Fiexes bug 887.
    
    ---
     ffmpeg.c |    5 ++++-
     1 files changed, 4 insertions(+), 1 deletions(-)
    
    diff --git a/ffmpeg.c b/ffmpeg.c
    index 29442f7..4c5bf13 100644
    a b need_realloc:  
    10971097                av_opt_set_int(ost->swr, "uch", ost->audio_channels_mapped, 0);
    10981098            }
    10991099            av_opt_set_int(ost->swr, "ich", dec->channels, 0);
    1100             av_opt_set_int(ost->swr, "och", enc->channels, 0);
     1100            if (av_opt_set_int(ost->swr, "och", enc->channels, 0)<0) {
     1101                av_log(NULL, AV_LOG_FATAL, "Too many output channels\n");
     1102                exit_program(1);
     1103            }
    11011104            if(audio_sync_method>1) av_opt_set_int(ost->swr, "flags", SWR_FLAG_RESAMPLE, 0);
    11021105            if(ost->swr && swr_init(ost->swr) < 0){
    11031106                av_log(NULL, AV_LOG_FATAL, "swr_init() failed\n");