Reimar Döffinger
d7b542ae29
Fix potential infinite discard loop.
...
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>
13 years ago
Anton Khirnov
6e9651d106
lavf: remove AVFormatParameters from AVFormatContext.read_header signature
13 years ago
Diego Biurrun
e873c03ac7
misc Doxygen markup improvements
13 years ago
Anton Khirnov
c3f9ebf743
lavf: make av_set_pts_info private.
...
It's supposed to be called only from (de)muxers.
13 years ago
Anton Khirnov
a2faa95151
lavf: make some seeking functions private
...
Specifically av_update_cur_dts(), av_seek_frame_binary() and
av_gen_search().
They are not supposed to be called outside lavf.
13 years ago
Anton Khirnov
84ad31ff18
lavf: replace av_new_stream->avformat_new_stream part II.
...
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.
13 years ago
Nicolas George
4ca59d1948
oggdec: add support for Xiph's CELT codec
...
This patch also introduces CODEC_ID_CELT.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Laurent Aimar
0e7efb9d23
oggdec: fix out of bound write in the ogg demuxer
...
Between ogg_save() and ogg_restore() calls, the number of streams
could have been reduced.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
13 years ago
Laurent Aimar
bc851a2946
Fix writes out of bounds in the ogg demuxer.
...
Between ogg_save() and ogg_restore() calls, the number of streams
could have been reduced.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
7e7012d0b4
oggdec: subtract time of first packet only from duration when it is significant
...
this fixes accuracy with normal ogg files while keeping support for ogg files
starting at times different from 0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
d2cab951e3
oggdec: Make sure start time correction is applied once to each stream
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Chris Evans
4cc3467e7a
oggdec: prevent heap corruption.
...
Specifically crafted samples can reinit ogg->streams[] while
reading samples, and thus we should not cache old pointers since
these may no longer be valid.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Nicolas George
9cec1bbd14
ogg: propagate return values and return more meaningful error values
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
14 years ago
Reimar Döffinger
0a94020b5b
oggdec: Abort Ogg header parsing when encountering a data packet.
...
Fixes Bugzilla #11 .
Signed-off-by: Diego Biurrun <diego@biurrun.de>
14 years ago
Ronald S. Bultje
9ed6cbc3ee
ogg: fix double free when finding length of small chained oggs.
...
ogg_save() copies streams[], but doesn't keep track of free()'ed
struct members. Thus, if in between a call to ogg_save() and
ogg_restore(), streams[].private was free()'ed, this would result
in a double free -> crash, which happened when e.g. playing small
chained ogg fragments.
14 years ago
Nicolas George
392aa6e444
ogg_read_packet: forward error code.
14 years ago
Michael Niedermayer
49125aeddc
oggdec: fix Ticket185
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Diego Biurrun
b751f61106
Remove stray extra arguments from av_dlog() invocations.
14 years ago
Mans Rullgard
e65ab9d94f
Remove unused variables
14 years ago
Clément Bœsch
adba9c6352
Fix various unused variable warnings
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Stefano Sabatini
2ef241c09f
oggdec: use av_dlog()
...
Simplify.
14 years ago
Nicolas George
bec994dff2
Ogg demuxer: give meaningful error codes and warnings.
...
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
14 years ago
Clément Bœsch
e575685fad
Cosmetics: fix prototypes in oggdec
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
14 years ago
Clément Bœsch
5780f41af5
oggdec: fix memleak with continuous streams.
...
This avoids the creation of a new AVStream instead of replacing it when
a stream reset occurs (track change with some webradios for example).
Signed-off-by: Diego Biurrun <diego@biurrun.de>
14 years ago
Clément Bœsch
b3bbc6fdc5
oggdec: use explicit AVInputFormat struct initializers
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
14 years ago
Clément Bœsch
f95257d27c
oggdec: simplify ogg_probe
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
14 years ago
Reimar Döffinger
48b9b7edb3
Replace deprecated url_fseek by avio_seek.
14 years ago
jan gerber
5901cd6236
oggdec:Correct duration
...
Based on a patch by Reimar Döffinger.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Diego Biurrun
045dd4b928
Replace some commented-out debug printf() / av_log() messages with av_dlog().
14 years ago
Clément Bœsch
dc713546d4
oggdec: reindent after 8f3eebd6
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
14 years ago
Michael Niedermayer
52512d0a43
oggdec: use av_freep() instead of av_free()
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Nicolas George
e61b83d29e
Ogg: add support for Xiph's CELT (Opus) codec.
...
This patch also introduces CODEC_ID_CELT.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
14 years ago
Clément Bœsch
8f3eebd663
oggdec: simplify audio chained ogg streams support
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
14 years ago
Michael Niedermayer
c104a6e902
oggdec: use av_freep() instead of av_free()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Clément Bœsch
47dec30edb
oggdec: fix demuxing chained audio streams
...
Chained ogg served by icecast and mpd should demux
properly now.
Fixes issue2337
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
14 years ago
Reimar Döffinger
d459d8e28d
Abort Ogg header parsing when we encounter a data packet.
...
Fixes ticket #15 .
14 years ago
Anton Khirnov
8978fedaee
avio: introduce an AVIOContext.seekable field
...
Use it instead of url_is_streamed and AVIOContext.is_streamed.
14 years ago
Anton Khirnov
db44ea960d
avio: avio_ prefix for url_fsize
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 76aa876e69
)
14 years ago
Anton Khirnov
1447dc59de
avio: deprecate url_fgetc and remove all it uses
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit e51975392d
)
14 years ago
Anton Khirnov
66e5b1df36
avio: deprecate url_feof
...
AVIOContext.eof_reached should be used directly instead.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
76aa876e69
avio: avio_ prefix for url_fsize
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
e51975392d
avio: deprecate url_fgetc and remove all it uses
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
384c9c2fa7
avio: add avio_tell macro as a replacement for url_ftell
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit a2704c9712
)
14 years ago
Anton Khirnov
a2704c9712
avio: add avio_tell macro as a replacement for url_ftell
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
f59d8ff8cd
avio: avio_ prefix for url_fseek
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 6b4aa5dac8
)
14 years ago
Anton Khirnov
6b4aa5dac8
avio: avio_ prefix for url_fseek
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
e63a362857
avio: avio_ prefixes for get_* functions
...
In the name of consistency:
get_byte -> avio_r8
get_<type> -> avio_r<type>
get_buffer -> avio_read
get_partial_buffer will be made private later
get_strz is left out becase I want to change it later to return
something useful.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit b7effd4e83
)
14 years ago
Anton Khirnov
b7effd4e83
avio: avio_ prefixes for get_* functions
...
In the name of consistency:
get_byte -> avio_r8
get_<type> -> avio_r<type>
get_buffer -> avio_read
get_partial_buffer will be made private later
get_strz is left out becase I want to change it later to return
something useful.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
471fe57e1a
avio: rename ByteIOContext to AVIOContext.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit ae628ec1fd
)
14 years ago
Anton Khirnov
ae628ec1fd
avio: rename ByteIOContext to AVIOContext.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago