summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
Commit message (Collapse)AuthorAgeFilesLines
* lavf: allow grouping packets in chunks of a user specified size and duration.Michael Niedermayer2011-12-011-4/+26
| | | | | | This is similar to MP4Boxs -inter Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavf: add audio_preload option, this allows interleaving audio earlierMichael Niedermayer2011-12-011-0/+10
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-011-2/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: rtpdec: Templatize the code for different g726 bitrate variants rv40: move loop filter to rv34dsp context lavf: make av_set_pts_info private. rtpdec: Add support for G726 audio rtpdec: Add an init function that can do custom codec context initialization avconv: make copy_tb on by default. matroskadec: don't set codec timebase. rmdec: don't set codec timebase. avconv: compute next_pts from input packet duration when possible. lavf: estimate frame duration from r_frame_rate. avconv: update InputStream.pts in the streamcopy case. Conflicts: avconv.c libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/fbdev.c libavdevice/libdc1394.c libavdevice/oss_audio.c libavdevice/v4l.c libavdevice/v4l2.c libavdevice/vfwcap.c libavdevice/x11grab.c libavformat/au.c libavformat/eacdata.c libavformat/flvdec.c libavformat/mpegts.c libavformat/mxfenc.c libavformat/rtpdec_g726.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: make av_set_pts_info private.Anton Khirnov2011-11-301-1/+9
| | | | | | | | It's supposed to be called only from (de)muxers.
| * lavf: estimate frame duration from r_frame_rate.Anton Khirnov2011-11-301-1/+4
| | | | | | | | | | If r_frame_rate is set, it should be more reliable for this than either codec or stream timebase.
| * pthread: do not touch has_b_framesJanne Grunau2011-11-221-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding the thread count in frame level multithreading to has_b_frames as an additional delay causes more problems than it solves. For example inconsistent behaviour during timestamp calculation in libavformat. Thread count and frame level multithreading are both set by the user. If the additional delay caused by frame level multithreading needs to be considered in the calling code it has all information to take it into account. Should it become necessary to calculate a maximum delay inside libavcodec it should be exported as its own field and not reusing an existing field. Based on a patch by Michael Niedermayer. Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* | lavf: give more weight to the extension during probing if there is a id3Michael Niedermayer2011-11-231-3/+4
| | | | | | | | | | | | | | tag that is larger than the probe buffer. Fixes Ticket336 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: minor cleanup of av_probe_input_format3()Michael Niedermayer2011-11-231-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: cdg has large non keyframe segments and should thus be exempt from the ↵Michael Niedermayer2011-11-191-1/+1
| | | | | | | | | | | | | | | | non keyframe check in seeking. Improves seeking for cdg files. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-171-3/+9
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mpegaudiodec: Don't use a nonexistent log context for av_dlog avformat: Accept the ISO8601 separate format as input, too avformat: Interpret times in ff_iso8601_to_unix_time as UTC avutil: Add av_timegm as a public function cinepak: Add another special case so that it can handle the following file: lagarith: add some RGBA decoding support lagarith: Add correct line prediction for RGB Conflicts: doc/APIchanges libavcodec/cinepak.c libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Accept the ISO8601 separate format as input, tooMartin Storsjö2011-11-161-3/+8
| | | | | | | | | | | | | | | | This makes the function accept the format of creation_time as output by demuxers (e.g. the mov demuxer), making the creation timestamp stay intact if transcoding. Signed-off-by: Martin Storsjö <martin@martin.st>
| * avformat: Interpret times in ff_iso8601_to_unix_time as UTCMartin Storsjö2011-11-161-1/+2
| | | | | | | | | | | | | | | | | | | | This function is used in muxers for parsing the 'creation_time' metadata key, for converting it to a time value. This makes it match the behaviour of the exported 'creation_time' metadata from demuxers, where it is in UTC, too. Signed-off-by: Martin Storsjö <martin@martin.st>
| * lavf: fix multiplication overflow in avformat_find_stream_info()Mans Rullgard2011-11-151-1/+1
| | | | | | | | | | | | | | Converting to double before the multiplication rather than after avoids an integer overflow in some cases. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | lavf: if timestamps are invalid (pts=dts) only drop dts.Michael Niedermayer2011-11-161-1/+1
| | | | | | | | | | | | | | Because if we drop both we have no timestamps at all for some files. Fixes Ticket344 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-141-4/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavf: pass options from AVFormatContext to avio. avformat: Use avio_open2, pass the AVFormatContext interrupt_callback onwards avio: add avio_open2, taking an interrupt callback and options avio: add support for passing options to protocols. avio: add and use ffurl_protocol_next(). avformat: Pass the interrupt callback on to chained muxers/demuxers avio: Add an AVIOInterruptCB parameter to ffurl_open/ffurl_alloc avformat: Use ff_check_interrupt avio: Add an internal utility function for checking the new interrupt callback avio: Add AVIOInterruptCB texi2html: remove stray \n doc: prettyfy the texi2html documentation swscale: handle unaligned buffers in yuv2plane1 Conflicts: libavformat/avformat.h libavformat/avio.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: pass options from AVFormatContext to avio.Anton Khirnov2011-11-131-3/+3
| |
| * avformat: Use avio_open2, pass the AVFormatContext interrupt_callback onwardsMartin Storsjö2011-11-131-1/+2
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * avformat: Use ff_check_interruptMartin Storsjö2011-11-131-1/+1
| |
| * lavf: don't leak corrupted packetsAndrey Utkin2011-11-091-0/+1
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | pthreads: drop has_b_frames mangling, its buggy in many many ways,Michael Niedermayer2011-11-091-5/+0
| | | | | | | | | | | | | | | | not to mention race conditions and that its used for stream copy, used to determine IPB type by applications and other things. Fixes various frame drop/timestamp issues with frame multithreading. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Check for OOM after av_mallocz() in ff_interleave_add_packet().Carl Eugen Hoyos2011-11-081-3/+8
| | | | | | | | Fixes a crash with the sample from Ubuntu bug #869125.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-081-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avformat: Avoid a warning about mixed declarations and code BMV demuxer and decoder matroskaenc: Make sure the seekhead struct is freed even on seek failure mpeg12enc: Remove write-only variables. mpeg12enc: Don't set up run-level info for level 0. msmpeg4: Don't set up run-level info for level 0. avformat: Warn about using network functions without calling avformat_network_init avformat: Revise wording rdt: Set AVFMT_NOFILE on ff_rdt_demuxer rdt: Check the return value of avformat_open rtsp: Discard the dynamic handler, if it has an alloc function which failed dsputil: use cpuflags in x86 versions of vector_clip_int32() Conflicts: libavcodec/avcodec.h libavcodec/version.h libavformat/Makefile libavformat/allformats.c libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Avoid a warning about mixed declarations and codeMartin Storsjö2011-11-081-1/+1
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * avformat: Warn about using network functions without calling ↵Martin Storsjö2011-11-071-0/+1
| | | | | | | | | | | | | | | | | | avformat_network_init This is to make developers aware of the fact that they will start using the new init function at some point. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-071-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (23 commits) x86inc: use sse versions of common macros instead of sse2 when applicable doc/APIchanges: add missing dates and hashes lavf: don't return from void av_update_cur_dts() Changelog: add more entries. Changelog: update ffmpeg/avconv incompatibility list. avconv: remove some redundant temporary variables. avconv: fix broken indentation avconv: move copy_initial_nonkeyframes to the options context. avconv: use file:stream instead of file.stream in log messages. doc/avconv: elaborate on basic functionality. doc/avconv: -sample_fmts, not -help sample_fmts prints the sample formats openssl: Only use CRYPTO_set_id_callback on OpenSSL < 1.0.0 Call avformat_network_init/deinit in the programs Remove leftover includes of strings.h avutil: Don't allow using strcasecmp/strncasecmp Replace all usage of strcasecmp/strncasecmp avstring: Add locale independent implementations of strcasecmp/strncasecmp avstring: Add locale independent implementations of toupper/tolower cosmetics: insert some spaces in explicit enum value assignments move 8SVX audio codecs to the audio codec list part on the next bump ... Conflicts: avprobe.c doc/APIchanges ffplay.c ffserver.c libavcodec/avcodec.h libavdevice/bktr.c libavdevice/v4l.c libavdevice/v4l2.c libavformat/matroskaenc.c libavformat/wtv.c libavutil/avstring.c libavutil/avstring.h libavutil/avutil.h libswscale/x86/swscale_template.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: don't return from void av_update_cur_dts()Anton Khirnov2011-11-061-1/+1
| |
| * Replace all usage of strcasecmp/strncasecmpReimar Döffinger2011-11-061-4/+3
| | | | | | | | | | | | | | | | | | | | | | All current usages of it are incompatible with localization. For example strcasecmp("i", "I") != 0 is possible, but would break many of the places where it is used. Instead use our own implementations that always treat the data as ASCII. Signed-off-by: Martin Storsjö <martin@martin.st>
* | lavf: remove commented check in compute_pkt_fields2()Stefano Sabatini2011-11-061-3/+0
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-061-0/+20
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: http: Remove the custom function for disabling chunked posts rtsp: Disable chunked http post through AVOptions movdec: Set frame_size for AMR h264_weight: remove duplication functions. swscale: align vertical filtersize by 2 on x86. libavfilter: reindent. matroskadec: empty blocks are in fact valid. avfilter: don't abort() on zero-size allocations. h264: improve calculation of codec delay. movenc: Set a correct packet size for AMR-NB mode 15, "no data" avformat: Add functions for doing global network initialization avformat: Add the https protocol avformat: Add the tls protocol, using OpenSSL or gnutls avformat: Initialize gnutls in ff_tls_init() w32threads: Wrap the mutex functions in inline functions returning int configure: Allow linking to the gnutls library avformat: Add ff_tls_init()/deinit() that initialize OpenSSL configure: Allow linking to openssl avcodec: Allow locking and unlocking an avformat specific mutex avformat: Split out functions from network.h to a new file, network.c Conflicts: Changelog configure doc/APIchanges libavcodec/internal.h libavcodec/version.h libavfilter/formats.c libavformat/matroskadec.c libavformat/mov.c libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Add functions for doing global network initializationMartin Storsjö2011-11-051-0/+20
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | lavf: fix null pointer dereference in rdtMichael Niedermayer2011-11-031-0/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Replace all strcasecmp/strncasecmp usages.Reimar Döffinger2011-11-031-4/+3
| | | | | | | | | | | | | | | | | | | | All current usages of it are incompatible with localization. For example strcasecmp("i", "I") != 0 is possible, but would break many of the places where it is used. Instead use our own implementations that always treat the data as ASCII. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | lavf: Do not set cur_dts to undetermined before first_dts has been ↵Michael Niedermayer2011-11-031-1/+2
| | | | | | | | | | | | calculated as this would upset the start_time and first_dts calculation. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-301-1/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (51 commits) cin audio: use sign_extend() instead of casting to int16_t cin audio: restructure decoding loop to avoid a separate counter variable cin audio: use local variable for delta value cin audio: remove unneeded cast from void* cin audio: validate the channel count cin audio: remove unneeded AVCodecContext pointer from CinAudioContext dsicin: fix several audio-related fields in the CIN demuxer flacdec: use av_get_bytes_per_sample() to get sample size dca: handle errors from dca_decode_block() dca: return error if the frame header is invalid dca: return proper error codes instead of -1 utvideo: handle empty Huffman trees binkaudio: change short to int16_t binkaudio: only decode one block at a time. binkaudio: store interleaved overlap samples in BinkAudioContext. binkaudio: pre-calculate quantization factors binkaudio: add some buffer overread checks. atrac3: support float or int16 output using request_sample_fmt atrac3: add CODEC_CAP_SUBFRAMES capability atrac3: return appropriate error codes instead of -1 ... Conflicts: libavcodec/atrac1.c libavcodec/dca.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: use number of output pictures for delay checks.Ronald S. Bultje2011-10-281-1/+3
| | | | | | | | | | | | This fixes false positives of has_codec_delay_been_guessed() for streams where not every input picture generates an output picture, such as interlaced H264.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-291-7/+39
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (53 commits) probe: Restore identification of files with very large id3 tags and no extension. probe: Remove id3 tag presence as a criteria to do file extension checking. mpegts: MP4 SL support mpegts: MP4 OD support mpegts: Add support for Sections in PMT mpegts: Replace the MP4 descriptor parser with a recursive parser. mpegts: Add support for multiple mp4 descriptors mpegts: Parse mpeg2 SL descriptors. isom: Add MPEG4SYSTEMS dummy object type indication. aacdec: allow output reconfiguration on channel changes nellymoserenc: take float input samples instead of int16 nellymoserdec: use dsp functions for overlap and windowing nellymoserdec: do not fail if there is extra data in the packet nellymoserdec: fail if output buffer is too small nellymoserdec: remove pointless buffer size check. lavf: add init_put_byte() to the list of visible symbols. seek-test: free options dictionary after use snow: do not draw_edge if emu_edge is set tools/pktdumper: update to recent avformat api seek-test: update to recent avformat api ... Conflicts: doc/APIchanges libavcodec/mpegaudiodec.c libavcodec/nellymoserdec.c libavcodec/snow.c libavcodec/version.h libavcodec/wmadec.c libavformat/avformat.h libavformat/mpegts.c libavformat/mxfdec.c libavformat/utils.c libavformat/wtv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * probe: Restore identification of files with very large id3 tags and no ↵Alex Converse2011-10-281-0/+8
| | | | | | | | | | | | | | | | extension. Restore behavior of identifying files with huge id3 tags as mp3 at AVPROBE_SCORE_MAX/4. This was broken in r25378 and subsequently removed in r25929.
| * probe: Remove id3 tag presence as a criteria to do file extension checking.Alex Converse2011-10-281-1/+1
| | | | | | | | | | This only encourages our users to put id3v2 tags on non-mp3 files to opt into extension based probing.
| * lavf: make some seeking functions privateAnton Khirnov2011-10-281-7/+38
| | | | | | | | | | | | | | Specifically av_update_cur_dts(), av_seek_frame_binary() and av_gen_search(). They are not supposed to be called outside lavf.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-261-12/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (22 commits) g722dec: check output buffer size before decoding g722dec: cosmetics: reindent/linewrap g722dec: remove the use of lowres for half-rate decoding. tta: check for extradata allocation failure in tta demuxer tta: check for allocation failure of decode_buffer tta: use correct frame_length calculation. tta: add support for decoding 24-bit sample format cosmetics: indentation tta: remove pointless braces tta: check output buffer size after adjusting frame length for last frame tta: fix reading of format in TTA header. tta: remove useless commented-out lines tta: check remaining bitstream size while reading unary value lavf: deprecate AVStream.stream_copy avconc: split choose_codec() to choose_decoder/choose_encoder. lavf: simplify by using FFMAX/FFMIN. mpegenc: add preload private option. cosmetics: simplify latm_decode_init latm: avoid unnecessary reinit of the aac decoder aacdec: initialize sbr context only in new channel elements ... Conflicts: avconv.c libavcodec/resample.c libavcodec/tta.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: simplify by using FFMAX/FFMIN.Anton Khirnov2011-10-251-12/+6
| |
* | utils: disable debuging code at the end of av_gen_search()Michael Niedermayer2011-10-211-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | utils: flush on successfull av_seek_frame_binary()Michael Niedermayer2011-10-211-0/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | seek: Fix av_gen_search() so that seeks outside max/min do not successfully ↵Michael Niedermayer2011-10-211-0/+10
| | | | | | | | | | | | | | | | seek to random points but rather seek to the min/max. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-211-4/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (47 commits) lavc: hide private symbols. lavc: deprecate img_get_alpha_info(). lavc: use avpriv_ prefix for ff_toupper4. lavc: use avpriv_ prefix for ff_copy_bits and align_put_bits. lavc: use avpriv_ prefix for ff_ac3_parse_header. lavc: use avpriv_ prefix for ff_frame_rate_tab. lavc: rename ff_find_start_code to avpriv_mpv_find_start_code lavc: use avpriv_ prefix for ff_split_xiph_headers. lavc: use avpriv_ prefix for ff_dirac_parse_sequence_header. lavc: use avpriv_ prefix for some dv symbols used in lavf. lavc: use avpriv_ prefix for some flac symbols used in lavf. lavc: use avpriv_ prefix for some mpeg4audio symbols used in lavf. lavc: use avpriv_ prefix for some mpegaudio symbols used in lavf. lavc: use avpriv_ prefix for ff_aac_parse_header(). lavf: hide private symbols. lavf: use avpriv_ prefix for some dv functions. lavf: use avpriv_ prefix for ff_new_chapter(). avcodec: add CODEC_CAP_DELAY note to avcodec_decode_audio3() documentation avcodec: clarify the CODEC_CAP_DELAY note in avcodec_decode_video2() avcodec: clarify documentation of CODEC_CAP_DELAY ... Conflicts: configure doc/general.texi libavcodec/Makefile libavcodec/aacdec.c libavcodec/allcodecs.c libavcodec/avcodec.h libavcodec/dv.c libavcodec/dvdata.c libavcodec/dvdata.h libavcodec/libspeexenc.c libavcodec/mpegvideo.c libavcodec/version.h libavformat/avidec.c libavformat/dv.c libavformat/dv.h libavformat/flvenc.c libavformat/mov.c libavformat/mp3enc.c libavformat/oggparsespeex.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: use avpriv_ prefix for ff_toupper4.Anton Khirnov2011-10-201-2/+2
| | | | | | | | It's used in lavf.
| * lavf: use avpriv_ prefix for ff_new_chapter().Anton Khirnov2011-10-201-1/+1
| | | | | | | | It's used in libavdevice.
| * avformat: do not require frame_size for Speex.Justin Ruggles2011-10-201-1/+0
| | | | | | | | | | Having it there forces decoding of a frame in order to get frame_size, but it is not really needed for proper demuxing or decoding.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-201-2/+11
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: presets: rename presets directory lavc: make avcodec_get_context_defaults3 "officially" public lavf: replace av_new_stream->avformat_new_stream part II. lavf,lavd: replace av_new_stream->avformat_new_stream part I. lavf: add avformat_new_stream as a replacement for av_new_stream. Use correct scaling table for bwd-pred MVs in second B-field Ut Video decoder Makefile: change presets extension to .avpreset lavfi: add rgbtestsrc source, ported from MPlayer libmpcodecs lavfi: add testsrc source AVOptions: add documentation. presets: update libx264 ffpresets Conflicts: Changelog doc/APIchanges doc/ffmpeg.texi ffpresets/libx264-ipod320.ffpreset ffpresets/libx264-ipod640.ffpreset ffserver.c libavcodec/avcodec.h libavcodec/options.c libavcodec/version.h libavdevice/libdc1394.c libavfilter/avfilter.h libavfilter/vsrc_testsrc.c libavformat/flvdec.c libavformat/riff.c libavformat/version.h libavformat/wtv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: add avformat_new_stream as a replacement for av_new_stream.Anton Khirnov2011-10-191-2/+11
| | | | | | | | It takes a codec parameter, thus enabling codec-specific defaults.