summaryrefslogtreecommitdiff
path: root/libavformat/oggdec.c
Commit message (Collapse)AuthorAge
* Fix various uses of av_log_missing_feature()Michael Niedermayer2012-10-21
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit 'd1f05dd18375f2f8e68372edee11436927e43ba8'Michael Niedermayer2012-09-25
|\ | | | | | | | | | | | | | | | | | | | | * commit 'd1f05dd18375f2f8e68372edee11436927e43ba8': ogg: calculate the start position once all the headers are parsed Conflicts: libavformat/oggdec.c libavformat/oggparseskeleton.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ogg: calculate the start position once all the headers are parsedLuca Barbato2012-09-24
| | | | | | | | | | The fisbone packets can be muxed in any order as long the last one comes before the first data packet.
* | oggdec: print a warning if the number of headers mismatch expectations.Michael Niedermayer2012-09-25
| | | | | | | | | | | | | | | | This is based on: commit 7751e4693dd10ec98c20fbd9887233b575034272 Author: Luca Barbato <lu_zero@gentoo.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | oggdec: print error when headers couldnt be parses successfullyMichael Niedermayer2012-09-25
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '7751e4693dd10ec98c20fbd9887233b575034272'Michael Niedermayer2012-09-25
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7751e4693dd10ec98c20fbd9887233b575034272': ogg: check that the expected number of headers had been parsed libx264: change default to closed gop to match x264cli Use avcodec_free_frame() to free AVFrames. lavf: use a malloced AVFrame in try_decode_frame(). lavc: add avcodec_free_frame(). lavc: ensure extended_data is set properly on decoding lavc: initialize AVFrame.extended_data in avcodec_get_frame_defaults() lavc: use av_mallocz to allocate AVFrames. lavc: rename the argument of avcodec_alloc_frame/get_frame_defaults Conflicts: doc/APIchanges doc/examples/decoding_encoding.c libavcodec/utils.c libavcodec/version.h libavfilter/src_movie.c libavformat/oggdec.c libavformat/oggdec.h libavformat/oggparsetheora.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ogg: check that the expected number of headers had been parsedLuca Barbato2012-09-24
| | | | | | | | Not having the header for a codec is a tell-tale of a broken file.
* | lavf/oggdec: check for begin-of-stream flag in case of chained streams.Clément Bœsch2012-09-22
| | | | | | | | | | | | | | | | | | | | | | | | Fix Ticket #1617, revealing a regression I introduced in 8f3eebd. We need to make sure no stream is added in between Ogg context save and restore operations (because it would likely lead to a mismatch between ogg->nstreams and AVFormatContext->nb_streams after the restore op). This is the reason the ogg->state check is added in ogg_new_stream(). Before this patch, checking for ogg->headers was preventing this: ogg->headers is always set before any ogg save/restore (though, it was also preventing from creating the stream when necessary).
* | lavf/oggdec: reword stream creation error message.Clément Bœsch2012-09-16
| |
* | lavf/oggdec: reindent and comment blocks.Clément Bœsch2012-09-16
| |
* | lavf/oggdec: make stream replacement less convoluted.Clément Bœsch2012-09-16
| | | | | | | | Also re-use the allocated buffer instead of re-allocating a new one.
* | lavf/oggdec: more explicit zeroing of the new ogg stream.Clément Bœsch2012-09-16
| |
* | lavf/oggdec: rework allocations in ogg_new_streams().Clément Bœsch2012-09-16
| |
* | lavf/oggdec: simplify destroying streams with chained audio streams.Clément Bœsch2012-09-16
| | | | | | | | nstreams is assumed to be 1 at that point, so the loop is pointless.
* | lavf/oggdec: rename str to sid.Clément Bœsch2012-09-16
| | | | | | | | | | "str" is misleading here (it's often used for string). "sid" makes more sense to identify a stream id.
* | lavf/oggdec: remove a comment not matching anything.Clément Bœsch2012-09-16
| |
* | lavf/oggdec: inline ogg_get_headers().Clément Bœsch2012-09-16
| | | | | | | | | | | | | | There is no point in a distant definition of a small function like this used only once. Additional spacing to distinguish better the block.
* | Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-07
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '36ef5369ee9b336febc2c270f8718cec4476cb85': Replace all CODEC_ID_* with AV_CODEC_ID_* lavc: add AV prefix to codec ids. Conflicts: doc/APIchanges doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c ffprobe.c ffserver.c libavcodec/8svx.c libavcodec/avcodec.h libavcodec/dnxhd_parser.c libavcodec/dvdsubdec.c libavcodec/error_resilience.c libavcodec/h263dec.c libavcodec/libvorbisenc.c libavcodec/mjpeg_parser.c libavcodec/mjpegenc.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/pcm.c libavcodec/r210dec.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/version.h libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/v4l2.c libavformat/asfdec.c libavformat/asfenc.c libavformat/avformat.h libavformat/avidec.c libavformat/caf.c libavformat/electronicarts.c libavformat/flacdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/framecrcenc.c libavformat/img2.c libavformat/img2dec.c libavformat/img2enc.c libavformat/ipmovie.c libavformat/isom.c libavformat/matroska.c libavformat/matroskadec.c libavformat/matroskaenc.c libavformat/mov.c libavformat/movenc.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegts.c libavformat/mxf.c libavformat/mxfdec.c libavformat/mxfenc.c libavformat/nsvdec.c libavformat/nut.c libavformat/oggenc.c libavformat/pmpdec.c libavformat/rawdec.c libavformat/rawenc.c libavformat/riff.c libavformat/sdp.c libavformat/utils.c libavformat/vocenc.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | oggdec: Initialize stream index to -1 in ogg_packet.Reimar Döffinger2012-08-05
| | | | | | | | | | | | | | | | | | | | The previous method of having to initialize it outside lead to incorrect code: even if it was initialized, it usually was only initialized once, thus a packet that could not be matched to any stream would just be processed with the return values from the previous call. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | oggdec: simplify start time calculation code.Reimar Döffinger2012-08-05
| | | | | | | | | | | | | | Also slightly more correct behaviour in case streams_left for some reason is 0 from the start. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | oggdec: check stream index before using it in ogg_get_length()Michael Niedermayer2012-08-05
| | | | | | | | | | | | | | | | | | Fixes crash based on a uninitialized array index read. If the read does not crash then out of array writes based on the same index might have been triggered afterwards. Found-by: inferno@chromium.org Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | oggdec: add support for Opus codec.Nicolas George2012-07-20
| | | | | | | | This patch also introduces CODEC_ID_OPUS.
* | oggdec: fix regression that caused reading the whole file during openMichael Niedermayer2012-06-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ogg: rewrite first timestamp reading code.Michael Niedermayer2012-05-14
| | | | | | | | | | | | | | | | this is simpler and closer to how timestamps are found for seeking. Fixes Ticket1186 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ogg: in ogg_get_length() start from data_offset not 0.Michael Niedermayer2012-05-14
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | oggdec: fix off by one error on pos_limitMichael Niedermayer2012-05-04
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | oggdec: print error on failure to create streamsMichael Niedermayer2012-05-04
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | oggdec: print error on changing streams when its unsupported.Michael Niedermayer2012-05-04
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | oggdec: print error on unsupported versionsMichael Niedermayer2012-05-04
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | oggdec: reset lastpts so that justins vorbis duration correction is not skipedMichael Niedermayer2012-05-04
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | oggdec: pass avformat context to ogg_reset()Michael Niedermayer2012-05-04
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | oggdec: Safety check against stream counts being inconsistent in seek()Michael Niedermayer2012-04-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | oggdec: Recreate streams only in the 1 stream case.Michael Niedermayer2012-04-17
| | | | | | | | | | | | | | | | Other cases are not supported and lead to inconsistencies which can lead to out of array writes. Reported-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-03-09
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: ttadec: unbreak playback of matroska files vorbisdec: avoid invalid memory access Fix uninitialized reads on malformed ogg files. huffyuv: add padding to classic (v1) huffman tables. png: convert to bytestream2 API. dca: include libavutil/mathematics.h for possibly missing M_SQRT1_2 avs: fix infinite loop on end-of-stream. tiffdec: Prevent illegal memory access caused by recycled pointers. rtpenc: Fix the AVRational used for av_rescale_q_rnd wma: fix off-by-one in array bounds check. Conflicts: libavcodec/huffyuv.c libavcodec/pngdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Fix uninitialized reads on malformed ogg files.Dale Curtis2012-03-08
| | | | | | | | | | | | | | | | | | | | The ogg decoder wasn't padding the input buffer with the appropriate FF_INPUT_BUFFER_PADDING_SIZE bytes. Which led to uninitialized reads in various pieces of parsing code when they thought they had more data than they actually did. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | oggdec: improve warning message.Reimar Döffinger2012-02-18
| | | | | | | | | | | | | | Print whether it was a keyframe or a non-keyframe that was incorrectly marked as the other. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Detect theora keyframes by content in Ogg demuxer.Reimar Döffinger2012-02-06
| | | | | | | | | | | | | | | | A lot of files do not mark keyframes correctly via granule, so detect keyframe or not based on data and complain if it mismatches. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | oggdec: add missing ogg_reset on seek.Reimar Döffinger2012-02-05
| | | | | | | | | | | | | | | | | | It would never be called when the searched-for position was already in the index. In the other cases, the ogg_reset at the end of the read_timestamp function handled it. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | oggdec: fix keyframe seeking when granule_is_start is 0.Reimar Döffinger2012-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this case, the pts values will be delayed by one, but at the same time pts values might only be supplied for e.g. keyframes. This results on only the frame after the keyframe having a pts value. As a hack, make read_timestamp return the keyframe position together with the pts from a following frame when seeking to a keyframe. Fixes trac issue #438. However it causes the read_timestamp function to return a pos value that is actually before the packet with the indicated pts. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Fix potential infinite discard loop.Reimar Döffinger2012-02-04
| | | | | | | | | | | | | | | | | | Fixes trac issue #438. Seeking in that sample would cause ogg_read_timestamp to fail because ogg_packet would go into a state where all packets of stream 1 would be discarded until the end of the stream. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-28
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * lavf: remove AVFormatParameters from AVFormatContext.read_header signatureAnton Khirnov2012-01-27
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-06
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mov: Don't av_malloc(0). avconv: only allocate 1 AVFrame per input stream avconv: fix memleaks due to not freeing the AVFrame for audio h264-fate: remove -strict 1 except where necessary (mr4/5-tandberg). misc Doxygen markup improvements doxygen: eliminate Qt-style doxygen syntax g722: Add a regression test for muxing/demuxing in wav g722: Change bits per sample to 4 g722dec: Signal skipping the lower bits via AVOptions instead of bits_per_coded_sample api-example: update to use avcodec_decode_audio4() avplay: use avcodec_decode_audio4() avplay: use a separate buffer for playing silence avformat: use avcodec_decode_audio4() in avformat_find_stream_info() avconv: use avcodec_decode_audio4() instead of avcodec_decode_audio3() mov: Allow empty stts atom. doc: document preferred Doxygen syntax and make patcheck detect it Conflicts: avconv.c ffplay.c libavcodec/mlpdec.c libavcodec/version.h libavformat/mov.c tests/codec-regression.sh tests/fate/h264.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * misc Doxygen markup improvementsDiego Biurrun2011-12-05
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-01
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-30
| | | | | | | | It's supposed to be called only from (de)muxers.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-29
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * lavf: make some seeking functions privateAnton Khirnov2011-10-28
| | | | | | | | | | | | | | 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-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: replace av_new_stream->avformat_new_stream part II.Anton Khirnov2011-10-19
| | | | | | | | | | | | | | | | Manual replacements are done in this commit. In many cases, the id is some constant made up number (e.g. 0 for video and 1 for audio), which is then not used in the demuxer for anything. Those ids are removed.