Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-02 05:29:42 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-08-11 20:59:43 +0400
commit588e7226edb823392e6c43b0af81c52ceebc1128 (patch)
tree61f2e7aa1bd88d3ba2aae79b1555f991972a1367 /ffmpeg_opt.c
parent0dc5868f141c1877dc530437643cc927f1c158b3 (diff)
ffmpeg_opt: Use av_guess_codec() instead of AVOutputFormat->*codec
Fixes part of ticket2236 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 956f4087c6eb717e31f3b92fe03fd56a3747eccf) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r--ffmpeg_opt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 3d50d7708b..c09675ce68 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -1783,7 +1783,7 @@ static int open_output_file(OptionsContext *o, const char *filename)
/* pick the "best" stream of each type */
/* video: highest resolution */
- if (!o->video_disable && oc->oformat->video_codec != AV_CODEC_ID_NONE) {
+ if (!o->video_disable && av_guess_codec(oc->oformat, NULL, filename, NULL, AVMEDIA_TYPE_VIDEO) != AV_CODEC_ID_NONE) {
int area = 0, idx = -1;
int qcr = avformat_query_codec(oc->oformat, oc->oformat->video_codec, 0);
for (i = 0; i < nb_input_streams; i++) {
@@ -1805,7 +1805,7 @@ static int open_output_file(OptionsContext *o, const char *filename)
}
/* audio: most channels */
- if (!o->audio_disable && oc->oformat->audio_codec != AV_CODEC_ID_NONE) {
+ if (!o->audio_disable && av_guess_codec(oc->oformat, NULL, filename, NULL, AVMEDIA_TYPE_AUDIO) != AV_CODEC_ID_NONE) {
int channels = 0, idx = -1;
for (i = 0; i < nb_input_streams; i++) {
ist = input_streams[i];