Paul B Mahol
a807c68253
avformat: use ff_alloc_extradata()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Paul B Mahol
269845db86
avformat/nutdec: check for allocation failures
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Michael Niedermayer
7f25050289
nutdec: use ff_find_last_ts()
...
Fixes finding the duration for nut files that are truncated
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
e0c53c3408
nut: use meaningful error values
...
Fix the mispresented EINVAL for EOF on partial files, among the other.
12 years ago
Luca Barbato
46c1917350
nut: use a define for the nut version
...
Ease switching version in the future and make evident why that value.
12 years ago
Michael Niedermayer
fd68371b07
nutdec: Implement duration parsing for indexed nuts
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
9bb54bb685
nutdec: more specific return codes for decode_syncpoint()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
7ccc0ed6a0
nutdec: print error on invalid/unsupported fourcc style
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
d8c772de53
nutdec: Always return a value from nut_read_timestamp()
...
The function is a callback that is called by ff_gen_search with
a constant stream index.
Avoid a false positive on older gcc version.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
ebfb738fa4
nutdec: sanity check r_frame_rate
...
This fixes files that store a somewhat incorrect value.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Justin Ruggles
bfe5454cd2
lavf: move ff_codec_get_tag() and ff_codec_get_id() definitions to internal.h
12 years ago
Luca Barbato
d4bff9f1ab
nut: support textual data
...
Plain text (utf8 encoded) data can be muxed and demuxed in nut.
12 years ago
Michael Niedermayer
73581afe01
nutdec: fix integer overflow
...
Fixes CID700575
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
bb502411dd
nutdec: check return value of av_new_packet()
...
Fixes CID733173.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Luca Barbato
1bd442c276
nut: prioritize native tags
...
Use native tags instead of avi ones, simplifies a lot raw video codecs
handling.
12 years ago
Luca Barbato
92281850a2
nut: support pcm codecs not mapped in avi
...
The native tags will be used when available.
12 years ago
Luca Barbato
72d30b2792
nut: add do {} while (0) to GET_V
...
Make it consistent with the other function-like macros.
12 years ago
Michael Niedermayer
e3fb5bc147
nut: store and read the r_frame_rate
...
With this, when we use a finer timebase than neccessary to store
durations the demuxer still knows what the original timebase was.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
c402d36afa
nutdec: fix get_vb_trace() / -DTRACE compile
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
83655442fa
nutdec: Remove unused and broken debug function stub
12 years ago
Diego Biurrun
93e81ee81c
nutdec: const correctness for get_v_trace/get_s_trace function arguments
12 years ago
Michael Niedermayer
fb96ac469a
nutdec: fix mixup of nb_streams and timebase_count
...
Fixes out of array read, should fix ffprove fate failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
6ab1166c77
nutdec: fix type of intermediate variable for ts calculation.
...
Prior to this it could theoretically become negative and read
out of array.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Carl Eugen Hoyos
73b40dafc8
Use correct format identifier for uint64_t.
12 years ago
Michael Niedermayer
e6a045ba56
nutdec: Flip the direction for seeking with an index in the failure case.
...
This is closer to how seeking works without an index
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
cebbaf578d
nutdec: improve information in error message
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Diego Biurrun
6774247a9d
avformat: Drop pointless "format" from container long names
12 years ago
Michael Niedermayer
ac2d3b0f6e
nutdec: set duration_estimation_method
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
3233ad4b44
nutdec: estimate duration from last syncpoint
...
Previously nut used the fallback of estimation by bitrate.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
e2c95e6bd8
nutdec: remove assert that is wrong for some new duration code.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
9d230ba924
nutdec: check that filesize is valid before using it.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Bradshaw
1f3f7bd444
Add AVFMT_SEEK_TO_PTS to nut demuxer flags
...
Signed-off-by: Michael Bradshaw <mbradshaw@sorensonmedia.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Reimar Döffinger
370211f470
nutdec: minor simplification.
...
Also fixes an (incorrect) "control reaches end of non-void function"
warning with some compilers.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Reimar Döffinger
1d128e5814
nutdec: replace assert with av_assert0.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Mans Rullgard
9d72c0527c
nutdec: add malloc check and fix const to non-const conversion warnings
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Diego Biurrun
679481b3b6
Drop some pointless #ifdefs.
...
The files are only compiled if the #ifdef conditions are met.
13 years ago
Asen Lekov
a559d65c07
nutdec: K&R formatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Martin Storsjö
20234a4bd7
cosmetics: Align muxer/demuxer declarations
...
Also add missing trailing commas, break long codec_tag lines and
add spaces in codec_tag declarations.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Anton Khirnov
6e9651d106
lavf: remove AVFormatParameters from AVFormatContext.read_header signature
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
Reimar Döffinger
bb3244dee2
Replace all usage of strcasecmp/strncasecmp
...
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>
13 years ago
Reimar Döffinger
96949dafcc
Replace all strcasecmp/strncasecmp usages.
...
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>
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
1fa395e471
lavf: use avpriv_ prefix for ff_new_chapter().
...
It's used in libavdevice.
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
Anton Khirnov
dfc2c4d900
lavf: use designated initialisers for all (de)muxers.
...
It's more readable and less prone to breakage.
14 years ago
Mans Rullgard
0ebcdf5cda
Do not include mathematics.h in avutil.h
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Anton Khirnov
d2d67e424f
Remove all uses of now deprecated metadata functions.
14 years ago
Mans Rullgard
14086341bf
nutdec: remove unused variable
14 years ago