Go to file
Clément Bœsch dbfe61100b avformat/vobsub: fix several issues.
Here is an extract of fate-samples/sub/vobsub.idx, with an additional
text at the end of each line to better identify each bitmap:

    timestamp: 00:04:55:445, filepos: 00001b000 Ace!
    timestamp: 00:05:00:049, filepos: 00001b800 Wake up, honey!
    timestamp: 00:05:02:018, filepos: 00001c800 I gotta go to work.
    timestamp: 00:05:02:035, filepos: 00001d000 <???>
    timestamp: 00:05:04:203, filepos: 00001d800 Look after Clayton, okay?
    timestamp: 00:05:05:947, filepos: 00001e800 I'll be back tonight.
    timestamp: 00:05:07:957, filepos: 00001f800 Bye! Love you.
    timestamp: 00:05:21:295, filepos: 000020800 Hey, Ace! What's up?
    timestamp: 00:05:23:356, filepos: 000021800 Hey, how's it going?
    timestamp: 00:05:24:640, filepos: 000022800 Remember what today is? The 3rd!
    timestamp: 00:05:27:193, filepos: 000023800 Look over there!
    timestamp: 00:05:28:369, filepos: 000024800 Where are they going?
    timestamp: 00:05:28:361, filepos: 000025000 <???>
    timestamp: 00:05:29:946, filepos: 000025800 Let's go see.
    timestamp: 00:05:31:230, filepos: 000026000 I can't, man. I got Clayton.

Note the two "<???>": they are basically split subtitles (with the
previous one), which the dvdsub decoder is now supposed to reconstruct
with a previous commit. But also note that while the first chunk has
increasing timestamps,

    timestamp: 00:05:02:018, filepos: 00001c800
    timestamp: 00:05:02:035, filepos: 00001d000

...it's not the case of the second one (and this is not an exception in the
original file):

    timestamp: 00:05:28:369, filepos: 000024800
    timestamp: 00:05:28:361, filepos: 000025000

For the dvdsub decoder, they need to be "filepos'ed" ordered, but the
FFDemuxSubtitlesQueue is timestamps ordered, which is the reason of the
introduction of a sub sort method in the context, to allow giving
priority to the position, and then the timestamps. With that change, the
dvdsub decoder get fed with ordered packets.

Now the packet size estimation was also broken: the filepos differences
in the vobsub index defines the full data read between two subtitles
chunks, and it is necessary to take into account what is read by the
mpegps_read_pes_header() function since the length returned by that
function doesn't count the size of the data it reads. This is fixed with
the introduction of total_read, and {old,new}_pos. By doing this change,
we can drop the unreliable len16 heuristic and simplify the whole loop.
Note that mpegps_read_pes_header() often read more than one PES packet
(typically in one call it can read 0x1ba and 0x1be chunk along with the
relevant 0x1bd packet), which triggers the "total_read + pkt_size >
psize" check. This is an expected behaviour, which could be avoided by
having a more chunked version of mpegps_read_pes_header().

The latest change is the extraction of each stream into its own
subtitles queue. If we don't do this, the maximum size for a subtitle
chunk is broken, and the previous changes can not work. Having each
stream in a different queue requires some little adjustments in the
seek code of the demuxer.

This commit is only meaningful as a whole change and can not be easily
split. The FATE test changes because it uses the vobsub demuxer.
2013-10-04 07:59:49 +02:00
compat Merge commit 'ef51692a49d58963966adca55c62da9c34c3c7e1' 2013-08-28 12:46:12 +02:00
doc avcodec: add av_codec_get_max_lowres() 2013-10-03 16:33:09 +02:00
libavcodec avcodec/dvdsubdec: reconstruct incomplete SPU packets. 2013-10-04 07:59:48 +02:00
libavdevice avdevice/v4l: remove duplicate include 2013-09-21 15:36:33 +02:00
libavfilter avfilter/vf_pullup: do not ignore frame field order 2013-10-03 02:43:20 +00:00
libavformat avformat/vobsub: fix several issues. 2013-10-04 07:59:49 +02:00
libavresample Reinstate proper FFmpeg license for all files. 2013-08-30 15:47:38 +00:00
libavutil Merge commit '5ce04c14dd3dd3670cbdba82275a3a72c716ec6f' 2013-10-03 21:29:38 +02:00
libpostproc postprocess_template: put rsp on the clobber list to prevent gcc from using it in "q" 2013-06-16 18:21:39 +02:00
libswresample swr: fix example code and doxy indent. 2013-09-29 23:37:46 +02:00
libswscale swscale/utils: dont divide by zero with zero vectors 2013-10-01 00:27:28 +02:00
presets presets: specify the codecs. 2012-05-04 18:40:36 +02:00
tests avformat/vobsub: fix several issues. 2013-10-04 07:59:49 +02:00
tools ffhash: Change size to an int 2013-09-24 16:29:18 +02:00
.gitignore tools: add benchmark for crypto functions. 2013-09-04 16:36:11 +02:00
COPYING.GPLv2 Rename COPYING.GPL --> COPYING.GPLv2 and COPYING.LGPL --> COPYING.LGPLv2.1. 2009-06-05 09:51:31 +00:00
COPYING.GPLv3 Add configure option to upgrade (L)GPL to version 3. 2009-06-05 11:04:03 +00:00
COPYING.LGPLv2.1 cosmetics: Delete empty lines at end of file. 2012-02-09 12:26:45 +01:00
COPYING.LGPLv3 Add configure option to upgrade (L)GPL to version 3. 2009-06-05 11:04:03 +00:00
CREDITS CREDITS: redirect to Git log, remove current outdated content 2013-01-31 18:02:52 +01:00
Changelog Native VP9 decoder. 2013-10-02 21:03:11 -04:00
INSTALL Merge remote branch 'qatar/master' 2011-04-08 02:50:13 +02:00
LICENSE avfilter: port pullup filter from libmpcodecs 2013-09-17 17:03:36 +00:00
MAINTAINERS lavf/libssh: add MAINTAINERS entry 2013-09-21 16:35:41 +02:00
Makefile Merge commit '90f9a5830b5d332de7ebb1ab45589f1870cbd65d' 2013-05-24 13:01:41 +02:00
README README: be a tiny bit more verbose 2012-04-06 10:23:26 +02:00
RELEASE Update for 2.0 2013-07-10 02:15:43 +02:00
arch.mak Merge commit 'b326755989b346d0d935e0628e8865f9b2951c30' 2012-12-08 14:24:16 +01:00
cmdutils.c cmdutils: print command support in -filters. 2013-09-30 10:15:22 +00:00
cmdutils.h Merge commit '636ced8e1dc8248a1353b416240b93d70ad03edb' 2013-07-08 04:34:11 +02:00
cmdutils_common_opts.h cmdutils_common_opts: fix indention of #if 2013-04-11 16:07:46 +02:00
common.mak Integrate lcov/gcov into Libav 2013-04-05 18:55:11 +02:00
configure Merge remote-tracking branch 'rbultje/master' 2013-10-03 13:56:52 +02:00
ffmpeg.c ffmpeg: dont return reserved values 2013-10-02 12:59:39 +02:00
ffmpeg.h Merge commit '488a0fa68973d48e264d54f1722f7afb18afbea7' 2013-08-06 12:41:04 +02:00
ffmpeg_filter.c ffmpeg_filter: check that the input media type match the filter 2013-08-14 03:03:41 +02:00
ffmpeg_opt.c ffmpeg: avoid direct access to lowres use av_codec_g/set_lowres() 2013-10-03 17:20:53 +02:00
ffplay.c ffplay: avoid direct access to lowres use av_codec_g/set_lowres() 2013-10-03 22:38:54 +02:00
ffprobe.c ffprobe: print stream channel_layout when available 2013-10-03 09:19:38 +02:00
ffserver.c ffserver: allow choosing the pixel format 2013-09-14 03:51:45 +02:00
library.mak Merge commit '472391b9a7e15e3bff33b016e7b6dbfa6a555975' 2013-03-28 12:12:38 +01:00
version.sh version.sh: handle shallow clones and snapshots. 2011-07-22 10:43:59 +02:00

README

FFmpeg README
-------------

1) Documentation
----------------

* Read the documentation in the doc/ directory in git.
  You can also view it online at http://ffmpeg.org/documentation.html

2) Licensing
------------

* See the LICENSE file.

3) Build and Install
--------------------

* See the INSTALL file.