Commit 9200514ad8 ("lavf: replace AVStream.codec with
AVStream.codecpar") merged in commit 6f69f7a8bf changed
avformat_find_stream_info() to put the extradata it got from
st->parser->parser->split() to st->internal->avctx instead of st->codec
(extradata in st->internal->avctx will be later copied to st->codecpar).
However, in the same function, the "is stream ready?" check was changed
to check for extradata in st->codecpar instead of st->codec, even
though st->codecpar is not yet updated at that point.
Extradata retrieved from split() is therefore not considered anymore,
and avformat_find_stream_info() will therefore needlessly continue
probing in some cases.
Fix that by checking for the extradata at st->internal->avctx where it
is actually put.
Adds a counter for when the "code detect timer" expired without
finding a valid packet.
Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Add some comments describing the fields in hdcd_state_t.
Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
HDCD is now only considered detected if a valid packet
is active in both channels simultaneously.
Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* commit 'f966498e433fead2f5e6b5b66fad2ac062146d22':
h264: decode the poc values from the slice header into the per-slice context
Merged-by: Clément Bœsch <u@pkh.me>
* commit '54dd9b1cdd9e54f1ee39ae25af0324f8aba2831b':
h264: set mb_aff_frame in frame_start()
h264: move the block starting a new field out of slice_header_parse()
Both commits are merged at the same time in order to prevent a
regression with Ticket #4440 (see 38660128).
Merged-by: Clément Bœsch <u@pkh.me>
If a JNI environment is not already attached to the thread where the
MediaCodec calls are made the current implementation will attach /
detach an environment for each MediaCodec call wasting some CPU time.
ff_jni_get_env replaces ff_jni_{attach,detach} by permanently attaching
an environment (if it is not already the case) to the current thread.
The environment will be automatically detached at the thread destruction
using a pthread_key callback.
Saves around 5% of CPU time (out of 20%) while decoding a stream with
MediaCodec.
The accessors are needed only from outside libavutil.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
It's a small and simple function that can be inlined.
This removes one private symbol and should reduce object dependencies with the next
major bump
Signed-off-by: James Almer <jamrial@gmail.com>
lavc/movenc rely on avpriv_dnxhd_parse_header_prefix declared by
dnxhddata.h since e47981dab7.
Fixes a missing symbol error in lavc/movenc if the dnxhd encoder is not
enabled.
This reverts commit d30cf57a7b, reversing changes made to
acc155ac55. The commit d30cf57a7b
provided irrelevant code complexity and decoding slowdown. But the main disadvantage of this
commit is a decoder crash. So it should be reverted.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
There is actually a need for the origin and end point not to be defined.
We can not automatically insert them with the y value of the first and
last point as it will influence the curves in a wrong way.
Fixes#5397
If this still doesnt give the same results on all platforms then this should be
disabled
Found-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Fix const corectness and zero init the struct. This example code would actually crash when initializing string.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>