diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-01-28 04:23:26 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-28 07:53:34 +0100 |
commit | e37f161e66e042d6c2c7470c4d9881df9427fc4a (patch) | |
tree | 6400fd6453f0525a65724937532d5baa33deead3 /libavcodec/utils.c | |
parent | f21b6159cf3110a5f018d6addf7382840d427199 (diff) | |
parent | e771e6dd63e837220aa5d959486546d2be972e83 (diff) | |
download | ffmpeg-e37f161e66e042d6c2c7470c4d9881df9427fc4a.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master: (71 commits)
movenc: Allow writing to a non-seekable output if using empty moov
movenc: Support adding isml (smooth streaming live) metadata
libavcodec: Don't crash in avcodec_encode_audio if time_base isn't set
sunrast: Document the different Sun Raster file format types.
sunrast: Add a check for experimental type.
libspeexenc: use AVSampleFormat instead of deprecated/removed SampleFormat
lavf: remove disabled FF_API_SET_PTS_INFO cruft
lavf: remove disabled FF_API_OLD_INTERRUPT_CB cruft
lavf: remove disabled FF_API_REORDER_PRIVATE cruft
lavf: remove disabled FF_API_SEEK_PUBLIC cruft
lavf: remove disabled FF_API_STREAM_COPY cruft
lavf: remove disabled FF_API_PRELOAD cruft
lavf: remove disabled FF_API_NEW_STREAM cruft
lavf: remove disabled FF_API_RTSP_URL_OPTIONS cruft
lavf: remove disabled FF_API_MUXRATE cruft
lavf: remove disabled FF_API_FILESIZE cruft
lavf: remove disabled FF_API_TIMESTAMP cruft
lavf: remove disabled FF_API_LOOP_OUTPUT cruft
lavf: remove disabled FF_API_LOOP_INPUT cruft
lavf: remove disabled FF_API_AVSTREAM_QUALITY cruft
...
Conflicts:
doc/APIchanges
libavcodec/8bps.c
libavcodec/avcodec.h
libavcodec/libx264.c
libavcodec/mjpegbdec.c
libavcodec/options.c
libavcodec/sunrast.c
libavcodec/utils.c
libavcodec/version.h
libavcodec/x86/h264_deblock.asm
libavdevice/libdc1394.c
libavdevice/v4l2.c
libavformat/avformat.h
libavformat/avio.c
libavformat/avio.h
libavformat/aviobuf.c
libavformat/dv.c
libavformat/mov.c
libavformat/utils.c
libavformat/version.h
libavformat/wtv.c
libavutil/Makefile
libavutil/file.c
libswscale/x86/input.asm
libswscale/x86/swscale_mmx.c
libswscale/x86/swscale_template.c
tests/ref/lavf/ffm
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 47 |
1 files changed, 7 insertions, 40 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 1d6a829cc5..dec9003e1d 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -107,10 +107,7 @@ AVCodec *av_codec_next(AVCodec *c){ else return first_avcodec; } -#if !FF_API_AVCODEC_INIT -static -#endif -void avcodec_init(void) +static void avcodec_init(void) { static int initialized = 0; @@ -799,23 +796,13 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD goto free_and_end; } avctx->frame_number = 0; -#if FF_API_ER - av_log(avctx, AV_LOG_DEBUG, "err{or,}_recognition separate: %d; %X\n", - avctx->error_recognition, avctx->err_recognition); - switch(avctx->error_recognition){ - case FF_ER_EXPLODE : avctx->err_recognition |= AV_EF_EXPLODE | AV_EF_COMPLIANT | AV_EF_CAREFUL; - break; - case FF_ER_VERY_AGGRESSIVE: - case FF_ER_AGGRESSIVE : avctx->err_recognition |= AV_EF_AGGRESSIVE; - case FF_ER_COMPLIANT : avctx->err_recognition |= AV_EF_COMPLIANT; - case FF_ER_CAREFUL : avctx->err_recognition |= AV_EF_CAREFUL; + if (avctx->codec_type == AVMEDIA_TYPE_AUDIO && + (!avctx->time_base.num || !avctx->time_base.den)) { + avctx->time_base.num = 1; + avctx->time_base.den = avctx->sample_rate; } - av_log(avctx, AV_LOG_DEBUG, "err{or,}_recognition combined: %d; %X\n", - avctx->error_recognition, avctx->err_recognition); -#endif - if (!HAVE_THREADS) av_log(avctx, AV_LOG_WARNING, "Warning: not compiled with thread support, using thread emulation\n"); @@ -1683,10 +1670,10 @@ const char *av_get_profile_name(const AVCodec *codec, int profile) unsigned avcodec_version( void ) { - av_assert0(CODEC_ID_V410==164); +// av_assert0(CODEC_ID_V410==164); av_assert0(CODEC_ID_PCM_S8_PLANAR==65563); av_assert0(CODEC_ID_ADPCM_G722==69660); - av_assert0(CODEC_ID_BMV_AUDIO==86071); +// av_assert0(CODEC_ID_BMV_AUDIO==86071); av_assert0(CODEC_ID_SRT==94216); av_assert0(LIBAVCODEC_VERSION_MICRO >= 100); @@ -1766,12 +1753,6 @@ void avcodec_default_free_buffers(AVCodecContext *avctx) } } -#if FF_API_OLD_FF_PICT_TYPES -char av_get_pict_type_char(int pict_type){ - return av_get_picture_type_char(pict_type); -} -#endif - int av_get_bits_per_sample(enum CodecID codec_id){ switch(codec_id){ case CODEC_ID_ADPCM_SBPRO_2: @@ -1821,12 +1802,6 @@ int av_get_bits_per_sample(enum CodecID codec_id){ } } -#if FF_API_OLD_SAMPLE_FMT -int av_get_bits_per_sample_format(enum AVSampleFormat sample_fmt) { - return av_get_bytes_per_sample(sample_fmt) << 3; -} -#endif - #if !HAVE_THREADS int ff_thread_init(AVCodecContext *s){ return -1; @@ -1982,14 +1957,6 @@ void ff_thread_await_progress(AVFrame *f, int progress, int field) #endif -#if FF_API_THREAD_INIT -int avcodec_thread_init(AVCodecContext *s, int thread_count) -{ - s->thread_count = thread_count; - return ff_thread_init(s); -} -#endif - enum AVMediaType avcodec_get_type(enum CodecID codec_id) { AVCodec *c= avcodec_find_decoder(codec_id); |