From 0116428d62cb0f00bb2b72b5505698a282482dcf 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 | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index 29442f7..c6b00d5 100644
|
a
|
b
|
need_realloc:
|
| 1096 | 1096 | av_opt_set_int(ost->swr, "icl", av_get_default_channel_layout(ost->audio_channels_mapped), 0); |
| 1097 | 1097 | av_opt_set_int(ost->swr, "uch", ost->audio_channels_mapped, 0); |
| 1098 | 1098 | } |
| 1099 | | av_opt_set_int(ost->swr, "ich", dec->channels, 0); |
| 1100 | | av_opt_set_int(ost->swr, "och", enc->channels, 0); |
| | 1099 | if (av_opt_set_int(ost->swr, "ich", dec->channels, 0) < 0) { |
| | 1100 | av_log(NULL, AV_LOG_FATAL, "Unsupported number of inputput channels\n"); |
| | 1101 | exit_program(1); |
| | 1102 | } |
| | 1103 | if (av_opt_set_int(ost->swr, "och", enc->channels, 0) < 0) { |
| | 1104 | av_log(NULL, AV_LOG_FATAL, "Unsupported number of output channels\n"); |
| | 1105 | exit_program(1); |
| | 1106 | } |
| 1101 | 1107 | if(audio_sync_method>1) av_opt_set_int(ost->swr, "flags", SWR_FLAG_RESAMPLE, 0); |
| 1102 | 1108 | if(ost->swr && swr_init(ost->swr) < 0){ |
| 1103 | 1109 | av_log(NULL, AV_LOG_FATAL, "swr_init() failed\n"); |