X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ffileffmpeg.C;h=2fbf6c86f80327055b703295b5d66017895aaf0e;hp=bcc558170db4817a3976f0a248aaabfe7aaa3b05;hb=refs%2Fheads%2Fmaster;hpb=b104b77f5296719bd5e6de8472eb71542ddaedec;ds=sidebyside diff --git a/cinelerra-5.1/cinelerra/fileffmpeg.C b/cinelerra-5.1/cinelerra/fileffmpeg.C index bcc55817..abed22da 100644 --- a/cinelerra-5.1/cinelerra/fileffmpeg.C +++ b/cinelerra-5.1/cinelerra/fileffmpeg.C @@ -1,3 +1,24 @@ +/* + * CINELERRA + * Copyright (C) 2008 Adam Williams + * Copyright (C) 2010 Monty Montgomery + * Copyright (C) 2012-2014 Paolo Rampino + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ #include #include @@ -159,7 +180,7 @@ void FFMpegPixelFormat::update_formats() pixfmts.remove_all_objects(); char video_codec[BCSTRLEN]; video_codec[0] = 0; const char *vcodec = vid_config->asset->vcodec; - AVCodec *av_codec = !FFMPEG::get_codec(video_codec, "video", vcodec) ? + const AVCodec *av_codec = !FFMPEG::get_codec(video_codec, "video", vcodec) ? avcodec_find_encoder_by_name(video_codec) : 0; const AVPixelFormat *pix_fmts = av_codec ? av_codec->pix_fmts : 0; if( pix_fmts ) { @@ -190,7 +211,7 @@ void FFMpegSampleFormat::update_formats() samplefmts.remove_all_objects(); char audio_codec[BCSTRLEN]; audio_codec[0] = 0; const char *acodec = aud_config->asset->acodec; - AVCodec *av_codec = !FFMPEG::get_codec(audio_codec, "audio", acodec) ? + const AVCodec *av_codec = !FFMPEG::get_codec(audio_codec, "audio", acodec) ? avcodec_find_encoder_by_name(audio_codec) : 0; const AVSampleFormat *sample_fmts = av_codec ? av_codec->sample_fmts : 0; if( sample_fmts ) { @@ -1472,7 +1493,7 @@ int FFOptions_Opt::types(char *rp) case AV_OPT_TYPE_SAMPLE_FMT: cp = N_(""); break; case AV_OPT_TYPE_DURATION: cp = N_(""); break; case AV_OPT_TYPE_COLOR: cp = N_(""); break; - case AV_OPT_TYPE_CHANNEL_LAYOUT: cp = N_(""); break; + case AV_OPT_TYPE_CHLAYOUT: cp = N_(""); break; case AV_OPT_TYPE_BOOL: cp = N_(""); break; default: cp = N_(""); break; } @@ -1852,7 +1873,7 @@ int FFOptionsViewAudio::handle_event() const char *name = asset->acodec; char audio_format[BCSTRLEN]; audio_format[0] = 0; char audio_codec[BCSTRLEN]; audio_codec[0] = 0; - AVCodec *codec = !ret && + const AVCodec *codec = !ret && !FFMPEG::get_format(audio_format, "audio", name) && !FFMPEG::get_codec(audio_codec, "audio", name) ? avcodec_find_encoder_by_name(audio_codec) : 0; @@ -1890,7 +1911,7 @@ int FFOptionsViewVideo::handle_event() const char *name = asset->vcodec; char video_format[BCSTRLEN]; video_format[0] = 0; char video_codec[BCSTRLEN]; video_codec[0] = 0; - AVCodec *codec = !ret && + const AVCodec *codec = !ret && !FFMPEG::get_format(video_format, "video", name) && !FFMPEG::get_codec(video_codec, "video", name) ? avcodec_find_encoder_by_name(video_codec) : 0;