Michael Niedermayer
7c4e3ddda1
avformat/nutdec: Fix use of uinitialized value
...
Fixes CID1041175
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
(cherry picked from commit 56abf35151
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-06-01 23:25:20 +02:00
Andreas Cadhalpun
9f99f29f23
nutdec: abort if EOF is reached in decode_info_header/read_sm_data
...
These loops can take a lot of time if count is very large.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at >
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
(cherry picked from commit bb23a15df5
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-06-01 23:25:19 +02:00
Andreas Cadhalpun
b947ff8985
nutdec: stop skipping bytes at EOF
...
This can unnecessarily waste a lot of time.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at >
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
(cherry picked from commit fa7dec8cb0
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-06-01 23:25:19 +02:00
Andreas Cadhalpun
936a5dd2c5
nutdec: fix infinite resync loops
...
nut->last_syncpoint_pos doesn't necessarily change between resync
attempts, so find_any_startcode can return the same startcode again.
Thus remember where the last resync happened and don't try to resync
before that.
This can't be done locally in nut_read_packet, because this wouldn't
prevent infinite resync loops, where after the resync a packet is
returned and while reading a following packet the resync happens again.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at >
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
(cherry picked from commit 37e679881d
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-06-01 23:25:19 +02:00
Michael Niedermayer
236452f83e
avformat/nutdec: Check X in 2nd branch of index reading
...
Prevents read of uninitialized variable
Based on patch by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com >
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
(cherry picked from commit ebb0ca3d70
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-06-01 23:25:19 +02:00
Michael Niedermayer
b45f67b05a
avformat/nutdec: Fix recovery when immedeately after seeking a failure happens
...
Found-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com >
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
(cherry picked from commit b3496b4a33
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-06-01 23:25:19 +02:00
Michael Niedermayer
179d850ded
avformat/nutdec: Return error on EOF from get_str()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
(cherry picked from commit 6bbb2f8f4d
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-06-01 23:25:19 +02:00
Michael Niedermayer
fb2d1b1b13
Merge commit '1f64b018cbec018fa66a4a20f79958d9707913de' into release/2.4
...
* commit '1f64b018cbec018fa66a4a20f79958d9707913de':
nut: Make sure to clean up on read_header failure
Conflicts:
libavformat/nutdec.c
See: 361702660d
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2015-05-19 22:01:21 +02:00
Andreas Cadhalpun
91aa6d8a8b
nutdec: fix memleaks on error in nut_read_header
...
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
(cherry picked from commit 361702660d
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-05-19 21:54:19 +02:00
Michael Niedermayer
95b42188d6
Merge commit '21b21aed797b5e636adcf2df811f96a95f208930' into release/2.4
...
* commit '21b21aed797b5e636adcf2df811f96a95f208930':
nut: Check chapter creation in decode_info_header
Conflicts:
libavformat/nutdec.c
See: 3ff1af2b0d
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2015-05-19 21:23:13 +02:00
Andreas Cadhalpun
63afe5b914
nutdec: check chapter creation in decode_info_header
...
This fixes a segmentation fault when accessing the metadata.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
(cherry picked from commit 3ff1af2b0d
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-05-19 21:21:39 +02:00
Luca Barbato
1f64b018cb
nut: Make sure to clean up on read_header failure
...
Based on Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com > work.
CC: libav-stable@libav.org
2015-05-19 12:14:55 +01:00
Andreas Cadhalpun
21b21aed79
nut: Check chapter creation in decode_info_header
...
This fixes a segmentation fault when accessing the metadata.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
CC: libav-stable@libav.org
2015-05-19 12:14:39 +01:00
Michael Niedermayer
749fadaa65
Merge commit '1551602b423755c4ed98c5b7b2c2d6504416726e' into release/2.4
...
* commit '1551602b423755c4ed98c5b7b2c2d6504416726e':
nutdec: check av_new_packet return value
Conflicts:
libavformat/nutdec.c
See: bb502411dd
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2015-01-18 01:10:10 +01:00
Vittorio Giovara
1551602b42
nutdec: check av_new_packet return value
...
CC: libav-stable@libav.org
Bug-Id: CID 733713
2015-01-13 00:01:33 +01:00
Michael Niedermayer
05dd5368a9
avformat/nutdec: always initialize event_flags
...
Fixes: CID1231990
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2014-08-20 16:45:08 +02:00
Michael Niedermayer
1110a030c7
Merge commit 'fa3a5dd4dea34baa6bb2f7fe6006fc4b2888f2aa'
...
* commit 'fa3a5dd4dea34baa6bb2f7fe6006fc4b2888f2aa':
nutdec: update AVFormatContext.event_flags with STREAM_/METADATA_UPDATED whenever metadata changes.
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2014-08-13 23:44:53 +02:00
Andrew Stone
fa3a5dd4de
nutdec: update AVFormatContext.event_flags with STREAM_/METADATA_UPDATED whenever metadata changes.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2014-08-13 16:23:36 +00:00
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 >
2014-08-08 00:48:38 +02:00
Michael Niedermayer
a26ecba075
Merge commit '52a1c32c0a86e84d43f977c5148e62975a0c6917'
...
* commit '52a1c32c0a86e84d43f977c5148e62975a0c6917':
nut: Use nut->version in the version range check
Conflicts:
libavformat/nutdec.c
Note, this bug did not affect ffmpeg
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2014-07-08 21:18:36 +02:00
Luca Barbato
52a1c32c0a
nut: Use nut->version in the version range check
...
It was wrongly left unchanged when the version field had been
introduced. (c94e2e85cb
)
2014-07-08 19:04:09 +02:00
Michael Niedermayer
a981d1b6aa
avformat/nutdec: if all else fails try to lookup video tag in isom
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2014-07-08 16:37:06 +02:00
Michael Niedermayer
74bd039f8c
avformat/nutdec: improve probe speed by 30%
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2014-06-24 18:40:40 +02:00
Michael Niedermayer
6b041cb617
avformat/nutdec: Fix handling of older 4.0 files
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2014-05-29 01:48:02 +02:00
Michael Niedermayer
a8499cbbe8
Merge commit 'c94e2e85cb6af8a570d8542a830556243bd32873'
...
* commit 'c94e2e85cb6af8a570d8542a830556243bd32873':
nut: Support experimental NUT 4 features
Conflicts:
doc/nut.texi
libavformat/nut.h
libavformat/nutdec.c
libavformat/nutenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2014-05-29 01:13:59 +02:00
Luca Barbato
c94e2e85cb
nut: Support experimental NUT 4 features
...
Add the low overhead pipe mode and the extended broadcast mode.
Export the options as 'syncponts' since it impacts only that.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
2014-05-28 22:04:56 +02:00
Michael Niedermayer
968516cebf
avformat/nut: add ff_nut_audio_extra_tags to demuxer too
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2014-04-09 23:37:55 +02:00
Michael Niedermayer
7f9697aa11
avformat/nutdec: fix packet end clearing
...
The code was buggy, using the wrong variable, also it missed the case
where the packet become smaller due to sidedata/metadata being extracted
which left a few bytes uninitialized
Fixes use of uninitialized memory
Fixed: msan_uninit-mem_7f6abbe44530_6838_mewmew_vorbis_ssa.nut
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2014-01-10 00:34:15 +01:00
Michael Niedermayer
71fe97a60a
avformat/nutdec: check avio_read() return code
...
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f2785ab8669_6838_mewmew_vorbis_ssa.nut
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2014-01-07 00:26:33 +01:00
Michael Niedermayer
d04aceb7d0
avformat/nutdec: remove unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2014-01-05 17:27:23 +01:00
Michael Niedermayer
8113e838a8
avformat/nut: add support for per frame side & meta data with version 4
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2014-01-04 14:13:31 +01:00
Michael Niedermayer
0cedc6c066
avformat/nutdec: use ff_get_extradata()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-12-25 17:38:29 +01:00
Michael Niedermayer
804ea14b35
avformat/nut: add minor_version field with version>=4
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-12-25 02:03:19 +01:00
Michael Niedermayer
6aa50374bf
avformat/nut: store version in the context
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-12-25 02:03:08 +01:00
Derek Buitenhuis
b1fcdc08ce
nut: Fix unchecked allocations
...
CC: libav-stable@libav.org
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com >
2013-10-22 17:09:56 +01:00
Derek Buitenhuis
55ae13e3de
nut: Fix unchecked allocations
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com >
2013-10-22 17:08:10 +01:00
Paul B Mahol
a807c68253
avformat: use ff_alloc_extradata()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2013-10-13 20:13:38 +00:00
Paul B Mahol
269845db86
avformat/nutdec: check for allocation failures
...
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2013-09-11 15:04:08 +00:00
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 >
2013-07-06 22:27:35 +02:00
Michael Niedermayer
9818bbde53
Merge commit 'e0c53c3408181d2e7d544eb65fc7355a79438dfe'
...
* commit 'e0c53c3408181d2e7d544eb65fc7355a79438dfe':
nut: use meaningful error values
FATE: use a less ambiguous end time for filter-trim-time test
Conflicts:
libavformat/nutdec.c
tests/fate/filter-video.mak
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2013-05-08 12:47:54 +02:00
Luca Barbato
e0c53c3408
nut: use meaningful error values
...
Fix the mispresented EINVAL for EOF on partial files, among the other.
2013-05-07 14:37:32 +02:00
Michael Niedermayer
77c85cbd9d
Merge commit '46c1917350f58dfab84e41919e6c02d43950db8c'
...
* commit '46c1917350f58dfab84e41919e6c02d43950db8c':
nut: use a define for the nut version
bgmc: Do not mark ff_bgmc_decode_init() as av_cold
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2013-05-06 10:41:43 +02:00
Luca Barbato
46c1917350
nut: use a define for the nut version
...
Ease switching version in the future and make evident why that value.
2013-05-06 09:14:43 +02:00
Michael Niedermayer
fd68371b07
nutdec: Implement duration parsing for indexed nuts
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-05-02 18:57:29 +02:00
Michael Niedermayer
9bb54bb685
nutdec: more specific return codes for decode_syncpoint()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-03-04 16:51:21 +01:00
Michael Niedermayer
7ccc0ed6a0
nutdec: print error on invalid/unsupported fourcc style
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-03-04 16:49:17 +01:00
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 >
2013-01-15 02:15:09 +01:00
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 >
2012-12-18 14:03:04 +01:00
Michael Niedermayer
076300bf8b
Merge commit 'bfe5454cd238b16e7977085f880205229103eccb'
...
* commit 'bfe5454cd238b16e7977085f880205229103eccb':
lavf: move ff_codec_get_tag() and ff_codec_get_id() definitions to internal.h
lavf: move "MP3 " fourcc from riff to nut
fate: vpx: Add dependencies
fate: Fix wavpack-matroskamode test dependencies
x86: dsputilenc: port to cpuflags
Conflicts:
libavformat/internal.h
libavformat/nut.c
tests/fate/vpx.mak
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2012-11-29 13:45:57 +01:00
Justin Ruggles
bfe5454cd2
lavf: move ff_codec_get_tag() and ff_codec_get_id() definitions to internal.h
2012-11-28 11:18:49 -05:00