Michael Niedermayer
e78d038187
avformat/asfdec: ignore packet_segments
...
Fixes Ticket1708
Based on patch by Alberto Delmás
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Alberto Delmás
edf7d15eb0
avformat/asfdec: reset packet_time_start when asf_read_frame_header() failed
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
76dad833e9
avformat/asfdec: remove duplicated packet_segments reset
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Martin Storsjö
cc41167aed
asfdec: Check the return value of asf_read_stream_properties
...
This makes sure errors in setting stream parameters are passed
on to the caller. This avoids successfully opening files while
some parameters aren't filled in properly.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Vladimir Pantelic
5f40833360
asfdec: substract preroll time from marker presentation time
...
this was forgotten when we changed ASF to not output the preroll time
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Paul B Mahol
81f231b5c7
avcodec/asfdec: check return value of av_mallocz()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Michael Niedermayer
4b101ab02e
avformat/asfdec: call ff_read_frame_flush() in asf_read_pts()
...
flushing just the asf demuxer but not the cores buffers leads to inconsistencies
and a "random" packet position which later causes an assertion failure
Fixes Ticket2853
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
7950e519bb
Disable deprecation warnings for cases where a replacement is available
12 years ago
Michael Niedermayer
d6686149e2
asfdec: Skip to keyframe after seeking
...
Fixes Ticket1616
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
6df20d0d35
asfdec: remove "ignoring invalid packet_obj_size" code
...
The code is no longer needed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
465aa53f21
asfdec: move packet_obj_size to ASFStream
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
cb6d02df4c
asfdec: avoid using AVStream->priv_data
...
This ensures that we dont write into one struct and read the other without
realizing that they arent identical.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
2832ea26f3
Remove commented-out debug #define cruft
12 years ago
Diego Biurrun
e926b5ceb1
avformat: Drop unnecessary ff_ name prefixes from static functions
12 years ago
Peter Ross
e544782623
riff: Move guid structs and helper functions into riff
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years ago
Anton Khirnov
1afddbe59e
avpacket: use AVBuffer to allow refcounting the packets.
...
This will allow us to avoid copying the packets in many cases.
This breaks ABI.
12 years ago
Michael Niedermayer
d929364814
asfdec: dont truncate type 2-5 values
...
Fixes use of uninitialized variables and possible out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Carl Eugen Hoyos
6091a8d92d
Avoid huge memory allocations from asf demuxer.
...
Fixes ticket #1888 .
12 years ago
Vladimir Pantelic
f5fac6f777
asfdec: support reading ID3v2 tags in ASF files
...
Yes, these files do exist
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Vladimir Pantelic
84b721db36
asfdec: also read Metadata Library Object
...
In some ASF files this objects holds cover art and other tags. Compared to
Metadata Object it can also hold GUIDs, but we ignore these for now.
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Vladimir Pantelic
61f9ad2dfc
asfdec: read the full Metadata Object, not just aspect ratio information
...
Use the same get_tag()/get_value() as for the Extended Content Description
but handle the 16 bit vs 32 bit difference for type 2 (BOOL)
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Vladimir Pantelic
36fab50e90
asfdec: silence a warning
...
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Anton Khirnov
1ef0e8a6bf
asfdec: do not assume every AVStream has a corresponding ASFStream
...
This won't be true for ID3 attached picture.
Also stop allocating now useless dummy ASFStreams for ASF native
attached pictures.
12 years ago
Diego Biurrun
48a4ffa722
asf: K&R formatting cosmetics
12 years ago
Michael Niedermayer
fe6767f849
asfdec: fix integer overflow in packet_replic_size check
...
Fixes assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
e817d9139f
asfdec: Fix printf format string length modifier
12 years ago
Michael Niedermayer
80aa89bdff
asfdec: check extradata size before alloc and read
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b7280cff9a
asfdec: check stream_index for validity
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
e5927910c2
asfdec: flip the interpretation of the header aspect back
...
This reverts 2de8877689
Fixes Ticket 1883
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
343c73e252
asfdec: parse aspect ratio payload extension
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
8c93269e42
asfdec: correctly parse payload extensions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
2d8c76eb1f
asfdec: parse payload extension list
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ed68085104
asfdec: fixed signedness in comparission
...
Fixes CID739864
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
292a08cbab
asfdec: cosmetics, reformat ff_asf_parse_packet()
12 years ago
Michael Niedermayer
d8f27eceaa
asfdec: ignore stored duration for truncated files
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
72eaba5e4f
avformat: Convert some commented-out printf/av_log instances to av_dlog
12 years ago
Diego Biurrun
11d4e92ed9
avformat: Remove non-compiling and/or silly commented-out printf/av_log statements
12 years ago
Michael Niedermayer
2de8877689
asfdec: invert SAR
...
It appears this was wrong
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Martin Storsjö
e6153f173a
avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
e47d979cab
asfdec: ignore too tiny indexes
...
Fixes Ticket1521
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
7d23a65f0d
asfdec: fix FRAME_HEADER_SIZE
...
Fixes Ticket1477
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
13 years ago
Diego Biurrun
0177b7d23a
Improve descriptiveness of a number of codec and container long names
13 years ago
Anton Khirnov
5e745cefc0
asfdec: read attached pictures.
13 years ago
Martin T. H. Sandsmark
a5c1a0c070
asfdec: fix returned error codes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Martin Storsjö
75b7feaeb4
asfdec: Add an option for not searching for the packet markers
...
Some streams don't contain these.
Signed-off-by: Martin Storsjö <martin@martin.st>
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
Michael Niedermayer
b61e596a14
asf: remove duplicated index_guid
...
Found-by:ramiro
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Ronald S. Bultje
44257ef426
asf: only set index_read if the index contained entries.
...
This allows falling back to a binary search if the file contains no
index, thus fixing seeking in such files (e.g. luckynight.wma).
13 years ago
Ronald S. Bultje
e73c6aaabf
asf: reset side data elements on packet copy.
...
Prevents crash (double free) when free()ing the original packet.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago