ffmpeg/libavformat
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
2009-03-15 20:14:25 +00:00
..
4xm.c
Makefile VQF demuxer 2009-03-07 22:42:09 +00:00
adtsenc.c ADTS: Increased protection against writing illegal/nonsense files. 2009-03-06 21:19:16 +00:00
aiff.c
allformats.c VQF demuxer 2009-03-07 22:42:09 +00:00
amr.c
apc.c
ape.c
asf.c
asf.h
asfcrypt.c
asfcrypt.h
asfdec.c
asfenc.c
assdec.c
assenc.c
au.c
audiointerleave.c Reorder arguments for av_fifo_generic_read to be more logical and 2009-03-09 17:47:47 +00:00
audiointerleave.h Allocate AVFifoBuffer through the fifo API to reduce future API/ABI issues. 2009-03-08 14:16:55 +00:00
avc.c
avc.h
avformat.h Pass packet position to the parser, so frame's AVPacket.pos is computed correctly. 2009-03-05 07:36:16 +00:00
avi.h
avidec.c
avienc.c
avio.c Add url_get_file_handle(), which is used to get the file descriptor 2009-03-03 17:04:51 +00:00
avio.h Add url_get_file_handle(), which is used to get the file descriptor 2009-03-03 17:04:51 +00:00
aviobuf.c
avisynth.c
avs.c
bethsoftvid.c
bfi.c
c93.c
crcenc.c
cutils.c
daud.c
dsicin.c
dv.c
dv.h
dvenc.c Allocate AVFifoBuffer through the fifo API to reduce future API/ABI issues. 2009-03-08 14:16:55 +00:00
dxa.c
eacdata.c
electronicarts.c
ffm.h
ffmdec.c
ffmenc.c
file.c Add url_get_file_handle(), which is used to get the file descriptor 2009-03-03 17:04:51 +00:00
flacdec.c flacdec: Parse the metadata header in the raw FLAC demuxer. 2009-03-06 01:31:10 +00:00
flacenc.c
flacenc.h
flic.c
flv.h
flvdec.c Replace two 'return AVERROR(EAGAIN);' by continue. The latter are nicer 2009-03-03 20:24:17 +00:00
flvenc.c
framecrcenc.c
gif.c
gopher.c
gxf.c
gxf.h
gxfenc.c reindent 2009-03-09 04:17:12 +00:00
http.c Add url_get_file_handle(), which is used to get the file descriptor 2009-03-03 17:04:51 +00:00
id3v2.c
id3v2.h
idcin.c
idroq.c Simplify RoQ demuxer pts calculation by using a appropriate time bases. 2009-03-13 13:37:35 +00:00
iff.c
img2.c
internal.h
ipmovie.c
isom.c
isom.h allocate palette in codec directly 2009-03-15 09:44:57 +00:00
iss.c
libnut.c
lmlm4.c
matroska.c
matroska.h
matroskadec.c
matroskaenc.c
metadata.c
metadata.h
metadata_compat.c
mm.c
mmf.c
mov.c typo in the mail, the 4am commit is always the worst 2009-03-15 10:53:12 +00:00
movenc.c typo in the mail, the 4am commit is always the worst 2009-03-15 10:53:12 +00:00
mp3.c
mpc.c
mpc8.c
mpeg.c Mark dvdaudio_substream_type variable as av_uninit to work around false 2009-03-05 19:13:12 +00:00
mpeg.h
mpegenc.c Reorder arguments for av_fifo_generic_read to be more logical and 2009-03-09 17:47:47 +00:00
mpegts.c
mpegts.h
mpegtsenc.c
mpjpeg.c
msnwc_tcp.c
mtv.c
mvi.c
mxf.c
mxf.h
mxfdec.c
mxfenc.c use utc time for timestamp and do not set it if not specified 2009-03-14 23:39:52 +00:00
ncdec.c
network.h
nsvdec.c
nut.c
nut.h
nutdec.c
nutenc.c
nuv.c Enable generic index creation and seeking for NUV demuxer. 2009-03-14 22:07:15 +00:00
oggdec.c
oggdec.h
oggenc.c
oggparseflac.c
oggparseogm.c
oggparsespeex.c
oggparsetheora.c
oggparsevorbis.c
oma.c
options.c
os_support.c
os_support.h
psxstr.c
pva.c
qtpalette.h
r3d.c
raw.c Make pcm_read_seek treat negative time stamps as 0, this avoids incorrectly 2009-03-14 20:50:54 +00:00
raw.h
rdt.c
rdt.h
riff.c sn40 avi fourcc decodes with ffodivx 2009-03-11 01:36:25 +00:00
riff.h
rl2.c
rm.c
rm.h
rmdec.c Fix index generation in the way that it was supposed to be used. See the 2009-03-15 20:14:25 +00:00
rmenc.c
rpl.c
rtp.c
rtp.h
rtp_aac.c
rtp_h264.c
rtp_h264.h
rtp_mpv.c
rtpdec.c
rtpdec.h Add url_get_file_handle(), which is used to get the file descriptor 2009-03-03 17:04:51 +00:00
rtpenc.c
rtpenc.h
rtpenc_h264.c
rtpproto.c Add url_get_file_handle(), which is used to get the file descriptor 2009-03-03 17:04:51 +00:00
rtsp.c rtpmap is case-insensitive, see comment from Luca in "[PATCH] rtsp.c: 2009-03-07 15:20:55 +00:00
rtsp.h
rtspcodes.h
sdp.c
segafilm.c
sierravmd.c
siff.c
smacker.c
sol.c
swf.h remove unused fields in swf context 2009-03-14 22:49:01 +00:00
swfdec.c swf timestamps are 16 bits 2009-03-14 22:51:38 +00:00
swfenc.c Reorder arguments for av_fifo_generic_read to be more logical and 2009-03-09 17:47:47 +00:00
tcp.c Add url_get_file_handle(), which is used to get the file descriptor 2009-03-03 17:04:51 +00:00
thp.c
tiertexseq.c
timefilter.c Add my name to copyright & author as requested by the original author. 2009-03-06 20:51:50 +00:00
timefilter.h Add my name to copyright & author as requested by the original author. 2009-03-06 20:51:50 +00:00
tta.c
txd.c
udp.c Add url_get_file_handle(), which is used to get the file descriptor 2009-03-03 17:04:51 +00:00
utils.c Add AVFMT_GENERIC_INDEX support also for formats that do not use a parser. 2009-03-14 21:46:00 +00:00
vc1test.c
vc1testenc.c
voc.c
voc.h
vocdec.c
vocenc.c
vqf.c VQF demuxer 2009-03-07 22:42:09 +00:00
wav.c
wc3movie.c Fix a condition that causes an infinite loop, but only when compiled with 2009-03-04 05:40:53 +00:00
westwood.c
wv.c
xa.c
yuv4mpeg.c