Ronald S. Bultje
7a160bca83
Fix index generation in the way that it was supposed to be used. See the
discussion in the ML thread "[PATCH] rmdec.c: merge old/new packet reading code". Over time, this code broke somewhat, e.g. seq was never actually written into (and was thus always 1, therefore the seq condition was always true), whereas it was supposed to be set to the sequence number of the video slice in case the video frame is divided over multiple RM packets (slices). The problem of this is that packets other than those containing the beginning of a video frame would be indexed as well. Secondly, flags&2 is supposed to be true for video keyframes and for these audio packets containing the start of a block. For some codecs (e.g. AAC), that is every single packet, whereas for others (e.g. cook), that is the packet containing the first of a series of scrambled packets that are to be descrambled together. Indexing any of the following would lead to incomplete and thus useless frames. Problem here is that flags would be reset to 2 to indicate that the first packet is ready to be returned, and in addition if no data was left to be returned (which is always true for the first packet), then we wouldn't actually write the index entry anyway. All in all, the idea was good and it probably worked at some point, but that is long ago. This patch should at the very least make it likely for this code to be executed again at the right times, i.e. the way it was originally intended to be used. Originally committed as revision 17993 to svn://svn.ffmpeg.org/ffmpeg/trunk
FFmpeg README ------------- 1) Documentation ---------------- * Read the documentation in the doc/ directory. 2) Licensing ------------ * Read the file COPYING.LGPL. FFmpeg and the associated libraries EXCEPT for libpostproc are licensed under the GNU Lesser General Public License. * libpostproc is distributed under the GNU General Public License, see the file COPYING.GPL for details. Its compilation and use in FFmpeg is optional. * libswscale contains some optional processor-specific optimizations that are distributed under the GNU General Public License. * The files libavcodec/x86/idct_mmx.c, libavcodec/x86/h264_deblock_sse2.asm and libavcodec/x86/h264_idct_sse2.asm are distributed under the GNU General Public License. They are strictly optimizations and their use is optional. * The file libavcodec/ac3dec.c is distributed under the GNU General Public License. In order for (E-)AC-3 decoding to work you need to enable GPL components. * The file libavdevice/x11grab.c is distributed under the GNU General Public License. X11 grabbing is optional. * The files libavcodec/jfdctfst.c, libavcodec/jfdctint.c, libavcodec/jrevdct.c are taken from libjpeg, see the top of the files for licensing details. * The file libavcodec/fdctref.c is copyrighted by the MPEG Software Simulation Group with all rights reserved. It is only used to create a DCT test program and not compiled into libavcodec. * Some external libraries are under GPL. If you wish to use them with FFmpeg, you have to configure FFmpeg as GPL as well.
Description
Languages
C
92.1%
Assembly
6%
Makefile
1.2%
C++
0.3%
Objective-C
0.2%
Other
0.1%