diff options
author | jstebbins <[email protected]> | 2011-07-27 15:09:49 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2011-07-27 15:09:49 +0000 |
commit | 7a47aa6da23391fa2f4f0bc46eb4f814e4590661 (patch) | |
tree | c464eed037523e1fee104e78b68c4a75e71e478d /libhb/update.c | |
parent | e71ac4bb36c9cec69ed4cb45a48e179d662fa828 (diff) |
libhb: fix or simplify several hacks involved with Libav support
For files that are demuxed by Libav, we must share the format context
with the decoder iso that it can obtain the codec context for each stream.
The code that did this was very convoluted and difficult to understand.
It is simplified by simply passing the context in hb_title_t.
Reader was closing stream files before the decoder was finished with the
context. This created the need to delay the actual close and cache
the context. Changed reader so it behaves more like the rest of handbrake's
work objects which lets us explicitly close after the decoders are finished.
Libav does some probing of the file when av_find_stream_info is called.
This probing leaves the format context in a bad state for some files and
causes subsequent reads or seeks to misbehave. So open 2 contexts in
ffmpeg_open. One is used only for probing, and the other only for reading.
decavcodec.c had 2 separate decoders for files demuxed by hb and files
demuxed by Libav. They have been combined and simplified.
Previously, it was not possible to decode one source audio track multiple
times in order to fan it out to multiple output tracks if the file is
demuxed by Libav. We were using the codec context from the format context.
Since there is only one of these for each stream, we could only do one
decode for each stream. Use avcodec_copy_context to make copies of
the codec context and allow multiple decodes. This allows removal of
a lot of special case code for Libav streams that was necessary to
duplicate the output of the decoder.
Patch Libav's mkv demux to fix a seek problem. This has been pushed
upstreams, so the next time we update Libav, we must remove this patch.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4141 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/update.c')
0 files changed, 0 insertions, 0 deletions