Hendrik Leppkes
c2f861ca42
Replace remaining occurances of av_free_packet with av_packet_unref
9 years ago
Rostislav Pehlivanov
0f87cbdd51
lavf: add oggparsedaala and bump micro
...
This commit introduces a parser for the current bitstream produced by
Daala. It currently bears a large similarity with Theora, another
codec produced by Xiph. While likely to change in the future, its basic
format of packet parsing should remain fairly identical with its current
structure.
Once the bitstream freezes, there are a few probable simplifications
that could be made. Also, the current version (major, minor and micro)
is stuck at zero so it's unusable as a way to warn about possible
incompatibilities. This will change once the bitstream freezes,
however until then this file is strictly targeting the current git
master of the reference encoder, libdaala.
This file was developed independently at the same time by both myself
and Vittorio Giovara, who used libav as a starting point. For fairness,
and to prevent confusion and allegations, his name has been added to the
copyright in the license header as well, and vice versa.
9 years ago
Michael Niedermayer
f8b81a02c9
avformat/oggdec: ogg_read_seek: reset ogg after seeking
...
Fixes Ticket4743
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 years ago
Vittorio Giovara
059a934806
lavc: Consistently prefix input buffer defines
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Michael Niedermayer
32d023eb6d
avformat/oggdec: Check buf before copying data in to it
...
Fixes null pointer dereference
Fixes: aace024653cc62947336b86f8de812ab_signal_sigsegv_a0500f_343_WobblyWindowsIntro.ogg with memlimit 262144
Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 years ago
Luca Barbato
656e31ed87
ogg: Forward errors further
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Vittorio Giovara
1a3eb042c7
Replace av_dlog with normal av_log at trace level
...
This applies to every library where performance is not critical.
10 years ago
Federico Tomassetti
27aa1ff35a
oggdec: Check memory allocation
...
Bug-Id: CID 1257798 / CID 1257805
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Michael Niedermayer
40adcf576f
avformat/oggdec: Check for ost allocation failure
...
Fixes CID1257798
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
9b8152bf04
avformat/oggdec: Check for av_malloc() failure and forward the error code
...
Fixes CID1257805
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
wm4
9deaec7828
lavf: move internal fields from public to internal context
...
This is not an API change; the fields were explicitly declared private
before.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
James Almer
430a816859
oggdec: add support for VP8 demuxing
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
wm4
b173f5c155
oggdec: fix invalid free on error
...
The read_packet callback passes a pointer to a stack-allocated AVPacket.
Attempting to free it with av_free() makes no sense.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
James Almer
d34ec64a22
replace calls to url_feof() with avio_feof()
...
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
466988ab75
Fix dont and doesnt typos
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Schenk, Michael
845414bbb1
avformat/oggdec: reset nstreams in close
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
4ccd7cb45b
avformat/oggdec/ogg_read_packet(): factorize failure code path
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
c1b24ca762
avformat/oggdec: check for av_packet_new_side_data() failure
...
Fixes CID1197062
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
James Almer
313a6c65b7
oggdec: validate VP8 keyframes
...
Fixes seeking with broken files
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Ben Boeckel
7eb84f2c3b
ogg: allow streams to update metadata
...
Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
5e0c7eab2a
avformat/oggdec: dont read timestamps from EOS pages of ogm videos
...
Some muxers store invalid timestamps there, which breaks seeking
Fixes Ticket2739
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
James Almer
d890db5f53
oggdec: add support for VP8 demuxing
...
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
551a679795
avformat/oggdec: reset end_trimming when it has been used, so it cannot be used twice by mistake
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Dale Curtis
9c0dd7b462
avformat/oggdec: reset end_trimming in ogg_reset()
...
Fixes the output when seeking back to the start
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6838e1f547
avformat/oggdec: favor av_freep() over av_free()
...
Found-by: Reimar Döffinger
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Nicolas George
ecab1c7741
oggdec: add support for Opus in Ogg demuxing
11 years ago
Vignesh Venkatasubramanian
23637f98f4
lavf/ogg: Support for end trimming Opus
...
Adding support for end trimming Opus embedded in Ogg container.
Signed-Off By: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Alexandra Khirnova
f369b9356c
avformat: Use av_reallocp_array() where suitable
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years ago
Reimar Döffinger
9a27acae9e
ogg: Fix potential infinite discard loop
...
Seeking in certain broken files 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.
Bug-Id: 553
CC: libav-stable@libav.org
Signed-off-by: Jan Gerber <j@v2v.cc>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Anton Khirnov
8ad3267ce3
oggdec: do not fall back on binary search in the generic code.
...
Binary search is already attempted in the format-specific seek function,
so the fallback is only reached if binary search failed already.
12 years ago
Luca Barbato
f963f701d9
ogg: relax demuxer conformance checks
...
Some samples in the wild are missing headers that are expected by the
specification but in practice do not affect decoding.
12 years ago
Michael Niedermayer
e278500181
oggdec: Support byte based seeking
...
Fixed Ticket2317
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
a9b424879f
lavc & lavf: replace deprecated av_log* functions
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
5d2f2c7643
oggdec: chained oggs have timestamp discontinuities
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ed37a566c9
oggdec: remove unused variables
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
c74d4658dc
oggdec: #if 0 disabled code
...
Fixes CID968589
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
7cb27d216d
oggdec: Support chained streams, support replacing streams in multistream files.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Conflicts:
Changelog
12 years ago
Michael Niedermayer
c994bb2fb7
oggdec: Leave treatment of serial changes to the decoder.
...
Attempting to re-parse the headers at demuxer level is a
pandora box the way its done currently.
This allows full reconfiguration of vorbis streams
Fixes Ticket2117
Fixes Ticket2121
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
c5cf58d4b9
oggdec: resync from the last page.
...
Previously we re synced from where we where which cam lead
to loosing pages.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
d894f74762
oggdec: make sure the private parse data is cleaned up
12 years ago
Luca Barbato
89b51b570d
oggdec: free the ogg streams on read_header failure
...
Plug an annoying memory leak on broken files.
12 years ago
Michael Niedermayer
ec40d15d82
oggdec: fix warning: assignment discards qualifiers from pointer target type
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
ba064ebe48
oggdec: check memory allocation
12 years ago
Luca Barbato
f5f1cf5224
oggdec: K&R cosmetic formatting
12 years ago
Michael Niedermayer
9db3fb6ed8
oggdec: prevent codec from changing through ogg_replace_stream()
...
This prevents inconsistencies leading to out of array accesses.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
07a866282f
oggdec: fix memleak on header parsing failure
...
Fixes Ticket1931
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
248b1ff26b
Fix various uses of av_log_missing_feature()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
4c273eb64c
oggdec: print a warning if the number of headers mismatch expectations.
...
This is based on:
commit 7751e4693d
Author: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
cc4deafed1
oggdec: print error when headers couldnt be parses successfully
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
d1f05dd183
ogg: calculate the start position once all the headers are parsed
...
The fisbone packets can be muxed in any order as long the last one
comes before the first data packet.
12 years ago