1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00
FFmpeg/libavformat
Marton Balint 4bee03034b lavf: let av_find_best_stream use bitrate info if available
I guess the user expects to see the stream with the highest bitrate, not with
the most frames, this is especially useful for multi bitrate streams.

This patch changes av_find_best_stream to select the stream based on a number
of conditions, the first condition has the highest priority, the last condition
has the lowest:

1) Select the stream with the highest FFMIN(5, codec_info_nb_frames) value
2) Select the stream with the highest bitrate
3) Select the stream with the highest codec_info_nb_frames
4) Select the first stream

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-18 13:57:08 +01:00
..
4xm.c
a64.c Merge remote-tracking branch 'qatar/master' 2012-11-02 14:57:36 +01:00
aacdec.c
ac3dec.c
act.c
adtsenc.c
adxdec.c
aea.c Merge commit '97bf7c03b1338a867da52c159a2afecbdedcfa88' 2012-11-12 11:32:11 +01:00
aiff.h
aiffdec.c aiffdec: read ID3 attached pictures 2012-10-26 01:52:40 +02:00
aiffenc.c
allformats.c AST demuxer 2012-11-17 19:30:08 +00:00
amr.c Merge commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b' 2012-11-13 10:55:07 +01:00
anm.c
apc.c Merge commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b' 2012-11-13 10:55:07 +01:00
ape.c
apetag.c
apetag.h
apetagenc.c
asf.c
asf.h asfdec: parse payload extension list 2012-11-03 05:35:35 +01:00
asfcrypt.c
asfcrypt.h
asfdec.c asfdec: check stream_index for validity 2012-11-03 05:58:12 +01:00
asfenc.c
assdec.c Merge remote-tracking branch 'qatar/master' 2012-10-28 14:24:27 +01:00
assenc.c lavf/assenc: add non strict ts flag. 2012-11-11 22:58:56 +01:00
ast.c ast: check bit depth too 2012-11-18 12:29:05 +00:00
au.c
audiointerleave.c Merge remote-tracking branch 'qatar/master' 2012-11-02 14:57:36 +01:00
audiointerleave.h
avc.c
avc.h
avformat.h Merge remote-tracking branch 'qatar/master' 2012-11-15 11:31:13 +01:00
avi.h
avidec.c
avienc.c lavf/avienc: return proper error codes, and provide some more feedback 2012-11-17 11:15:00 +01:00
avio_internal.h
avio.c Merge commit '4521645b1aee9e9ad8f5cea7b2392cd5f6ffcd26' 2012-10-28 13:19:11 +01:00
avio.h
aviobuf.c avio: detect implicit truncation by assert in avio_w* 2012-10-24 15:42:00 +02:00
avisynth.c
avlanguage.c
avlanguage.h
avr.c lavf/avr: make .long_name consistent with others 2012-11-05 20:47:22 +00:00
avs.c
bethsoftvid.c Merge commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b' 2012-11-13 10:55:07 +01:00
bfi.c Merge commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b' 2012-11-13 10:55:07 +01:00
bink.c Merge commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b' 2012-11-13 10:55:07 +01:00
bintext.c
bit.c bit: check av_new_packet() return value 2012-10-26 15:34:25 +00:00
bluray.c
bmv.c bmv: set channel layout 2012-11-12 10:33:18 -05:00
c93.c
cache.c
caf.c
caf.h
cafdec.c cafdec: fix parsing of chunks which may have unused data 2012-10-28 20:33:29 +00:00
cafenc.c caf muxer: write metadata 2012-10-26 03:12:45 +00:00
cavsvideodec.c
cdg.c
cdxl.c Merge commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b' 2012-11-13 10:55:07 +01:00
concat.c
crcenc.c
crypto.c
cutils.c
daud.c Merge commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b' 2012-11-13 10:55:07 +01:00
dfa.c
diracdec.c
dnxhddec.c
dsicin.c Merge commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b' 2012-11-13 10:55:07 +01:00
dtsdec.c
dtshddec.c
dv.c dvdec: check ipcm more completely, avoid assert failure. 2012-11-13 21:45:53 +01:00
dv.h
dvenc.c
dxa.c
eacdata.c
electronicarts.c electronicarts: check size before reading duration out of a chunk. 2012-11-17 20:43:56 +01:00
ffm.h
ffmdec.c ffmdec: remove unused variable 2012-11-08 15:54:14 +01:00
ffmenc.c ffm: redesign header format to make it extensible 2012-11-05 16:36:44 +01:00
ffmeta.h
ffmetadec.c
ffmetaenc.c
file.c
filmstripdec.c
filmstripenc.c filmstripenc: fix rounding that caused fate failure 2012-11-05 00:28:21 +01:00
flacdec.c
flacenc_header.c
flacenc.c
flacenc.h
flic.c Merge commit '97bf7c03b1338a867da52c159a2afecbdedcfa88' 2012-11-12 11:32:11 +01:00
flv.h
flvdec.c flvdec: disable hack that attempts to parse aac bitstream in the flv demuxer. 2012-11-17 18:49:08 +01:00
flvenc.c
framecrcenc.c
framehash.c
g722.c Merge commit '1b891d17c531e8a63c2974aab4bf997ce70746f3' 2012-10-26 14:24:57 +02:00
g723_1.c Merge commit '97bf7c03b1338a867da52c159a2afecbdedcfa88' 2012-11-12 11:32:11 +01:00
g729dec.c
gif.c
gopher.c
gsmdec.c Merge commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b' 2012-11-13 10:55:07 +01:00
gxf.c Merge commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b' 2012-11-13 10:55:07 +01:00
gxf.h
gxfenc.c
h261dec.c
h263dec.c
h264dec.c
hls.c
hlsenc.c Merge commit '5e9c6ef8f3beb9ed7b271654a82349ac90fe43f2' 2012-11-14 11:59:20 +01:00
hlsproto.c
http.c http: add -content_type user option. 2012-10-24 22:15:31 +02:00
http.h
httpauth.c
httpauth.h
icodec.c
icoenc.c Update my email address 2012-10-27 02:06:21 +02:00
id3v1.c
id3v1.h
id3v2.c parse ID3v2 chapters 2012-10-28 15:10:28 +00:00
id3v2.h
id3v2enc.c
idcin.c
idroqdec.c Merge commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b' 2012-11-13 10:55:07 +01:00
idroqenc.c
iff.c iff: process DEEP DLOC chunk to obtain image dimensions 2012-11-18 13:47:17 +01:00
ilbc.c
img2.c
img2dec.c Allow forcing a frame size in bytes for image2pipe. 2012-11-10 02:25:17 +01:00
img2enc.c img2enc: remove dead code 2012-11-18 12:09:20 +00:00
ingenientdec.c
internal.h Merge remote-tracking branch 'qatar/master' 2012-11-15 11:31:13 +01:00
ipmovie.c Merge commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b' 2012-11-13 10:55:07 +01:00
isom.c
isom.h
iss.c Merge commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b' 2012-11-13 10:55:07 +01:00
iv8.c
ivfdec.c
ivfenc.c
jacosubdec.c
jacosubenc.c
jvdec.c Merge commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b' 2012-11-13 10:55:07 +01:00
latmenc.c
libavformat.v
libmodplug.c
libnut.c
librtmp.c
lmlm4.c
loasdec.c
log2_tab.c
lvfdec.c lvfdec: cosmetics: fix identation 2012-10-25 20:57:40 +00:00
lxfdec.c lxfdec: remove deplanarization hack 2012-11-17 19:30:04 +00:00
m4vdec.c
Makefile AST demuxer 2012-11-17 19:30:08 +00:00
matroska.c
matroska.h
matroskadec.c matroskadec: check h in generic rm packet shuffler 2012-11-11 01:19:44 +01:00
matroskaenc.c matroskaenc: avoid implicit truncation in avio_w* 2012-10-24 15:27:01 +02:00
md5enc.c
md5proto.c
metadata.c
metadata.h
mgsts.c
microdvddec.c
microdvdenc.c
mkvtimestamp_v2.c
mm.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
mmf.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
mms.c
mms.h
mmsh.c
mmst.c
mov_chan.c Merge commit '97bf7c03b1338a867da52c159a2afecbdedcfa88' 2012-11-12 11:32:11 +01:00
mov_chan.h
mov.c Fix possible NULL-pointer dereference when decoding mov files. 2012-11-18 08:52:50 +01:00
movenc.c Merge remote-tracking branch 'qatar/master' 2012-11-15 11:31:13 +01:00
movenc.h
movenchint.c Merge remote-tracking branch 'qatar/master' 2012-11-15 11:31:13 +01:00
mp3dec.c mp3dec: remove unused variable 2012-10-29 22:11:21 +01:00
mp3enc.c lavf/mp3enc: make sure the header is valid before writing audio pkt. 2012-11-16 14:11:08 +01:00
mpc8.c
mpc.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
mpeg.c
mpeg.h
mpegenc.c
mpegts.c mpegts: prevent freeing ones own section in pat_cb 2012-11-13 21:45:53 +01:00
mpegts.h
mpegtsenc.c
mpegvideodec.c mpegvideo_probe: check slice order 2012-11-01 15:08:03 +01:00
mpjpeg.c
msnwc_tcp.c
mtv.c
mux.c
mvi.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
mxf.c
mxf.h
mxfdec.c mxfdec: fix potential integer overflow in mxf_compute_sample_count() 2012-11-17 02:20:50 +01:00
mxfenc.c mxfenc: Write MultipleDescriptor ref in Preface 2012-10-25 13:56:24 +02:00
mxg.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
ncdec.c
network.c Merge commit '4521645b1aee9e9ad8f5cea7b2392cd5f6ffcd26' 2012-10-28 13:19:11 +01:00
network.h Merge commit '80521c1997a23e148edf89e11b939ab8646297ca' 2012-10-24 12:53:26 +02:00
nsvdec.c
nullenc.c
nut.c PCM signed 16-bit big-endian planar decoder 2012-11-17 19:30:08 +00:00
nut.h Merge commit '381dc1a5ec0925b281c573457c413ae643567086' 2012-10-30 13:52:03 +01:00
nutdec.c Merge commit '381dc1a5ec0925b281c573457c413ae643567086' 2012-10-30 13:52:03 +01:00
nutenc.c Merge commit '381dc1a5ec0925b281c573457c413ae643567086' 2012-10-30 13:52:03 +01:00
nuv.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
oggdec.c
oggdec.h
oggenc.c oggenc: remove unneeded null check. 2012-11-05 00:28:21 +01:00
oggparsecelt.c
oggparsedirac.c
oggparseflac.c
oggparseogm.c
oggparseopus.c
oggparseskeleton.c Merge commit '8b8899ac3233b4f7af83ded0dc032fad8902d714' 2012-10-23 15:00:27 +02:00
oggparsespeex.c oggparsespeex: validate channel count and set channel layout 2012-11-12 10:33:20 -05:00
oggparsetheora.c
oggparsevorbis.c
oma.c
oma.h
omadec.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
omaenc.c
options_table.h
options.c
os_support.c Merge commit '80521c1997a23e148edf89e11b939ab8646297ca' 2012-10-24 12:53:26 +02:00
os_support.h Merge commit '0c03cc68386443f1e96ab6fb358220faf67cd5ff' 2012-10-24 13:42:58 +02:00
paf.c paf: set channel layout 2012-11-13 13:25:19 +00:00
pcm.c
pcm.h
pcmdec.c Merge remote-tracking branch 'qatar/master' 2012-10-26 15:20:48 +02:00
pcmenc.c
pmpdec.c
psxstr.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
pva.c
qcp.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
qtpalette.h
r3d.c
rawdec.c Merge commit '1b891d17c531e8a63c2974aab4bf997ce70746f3' 2012-10-26 14:24:57 +02:00
rawdec.h Merge commit '1b891d17c531e8a63c2974aab4bf997ce70746f3' 2012-10-26 14:24:57 +02:00
rawenc.c
rawenc.h
rawvideodec.c Merge commit '1b891d17c531e8a63c2974aab4bf997ce70746f3' 2012-10-26 14:24:57 +02:00
rdt.c
rdt.h
realtextdec.c
riff.c riff: add SMV2 FourCC for H264 2012-11-10 13:16:14 +01:00
riff.h
rl2.c
rm.c
rm.h
rmdec.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
rmenc.c
rmsipr.c
rmsipr.h
rpl.c
rso.c
rso.h
rsodec.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
rsoenc.c
rtmp.h
rtmpcrypt.c
rtmpcrypt.h
rtmpdh.c
rtmpdh.h
rtmphttp.c
rtmppkt.c
rtmppkt.h Merge commit '0c03cc68386443f1e96ab6fb358220faf67cd5ff' 2012-10-24 13:42:58 +02:00
rtmpproto.c rtmpproto: Use av_strlcat instead of strncat 2012-11-05 21:47:43 +01:00
rtp.c Merge remote-tracking branch 'qatar/master' 2012-11-15 11:31:13 +01:00
rtp.h Merge remote-tracking branch 'qatar/master' 2012-11-15 11:31:13 +01:00
rtpdec_amr.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
rtpdec_asf.c
rtpdec_formats.h
rtpdec_g726.c
rtpdec_h263_rfc2190.c rtpdec: factorize identical code used in several handlers 2012-11-02 07:58:37 +01:00
rtpdec_h263.c
rtpdec_h264.c
rtpdec_ilbc.c
rtpdec_jpeg.c Merge remote-tracking branch 'qatar/master' 2012-11-02 14:57:36 +01:00
rtpdec_latm.c
rtpdec_mpeg4.c
rtpdec_qcelp.c
rtpdec_qdm2.c
rtpdec_qt.c
rtpdec_svq3.c Merge remote-tracking branch 'qatar/master' 2012-11-02 14:57:36 +01:00
rtpdec_vp8.c Merge remote-tracking branch 'qatar/master' 2012-11-02 14:57:36 +01:00
rtpdec_xiph.c Merge remote-tracking branch 'qatar/master' 2012-11-02 14:57:36 +01:00
rtpdec.c Merge remote-tracking branch 'qatar/master' 2012-11-02 14:57:36 +01:00
rtpdec.h Merge remote-tracking branch 'qatar/master' 2012-11-02 14:57:36 +01:00
rtpenc_aac.c Merge remote-tracking branch 'qatar/master' 2012-11-09 10:29:51 +01:00
rtpenc_amr.c
rtpenc_chain.c Merge remote-tracking branch 'qatar/master' 2012-11-15 11:31:13 +01:00
rtpenc_chain.h Merge remote-tracking branch 'qatar/master' 2012-11-15 11:31:13 +01:00
rtpenc_h263_rfc2190.c
rtpenc_h263.c
rtpenc_h264.c
rtpenc_jpeg.c
rtpenc_latm.c
rtpenc_mpv.c
rtpenc_vp8.c
rtpenc_xiph.c
rtpenc.c Merge remote-tracking branch 'qatar/master' 2012-11-15 11:31:13 +01:00
rtpenc.h
rtpproto.c
rtsp.c Merge remote-tracking branch 'qatar/master' 2012-11-15 11:31:13 +01:00
rtsp.h
rtspcodes.h
rtspdec.c
rtspenc.c
samidec.c
sapdec.c
sapenc.c Merge remote-tracking branch 'qatar/master' 2012-11-15 11:31:13 +01:00
sauce.c
sauce.h
sbgdec.c sbgdec: dont set slide to a uninitialized value 2012-11-06 21:46:22 +01:00
sctp.c sctp: silence const warning 2012-11-08 16:06:04 +01:00
sdp.c Merge remote-tracking branch 'qatar/master' 2012-11-15 11:31:13 +01:00
seek-test.c
seek.c
seek.h
segafilm.c segafilm: fix division by 0 2012-11-11 18:32:46 +01:00
segment.c segment: fix NULL pointer dereference in seg_write_header() 2012-11-14 12:33:27 +02:00
sierravmd.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
siff.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
smacker.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
smjpeg.c
smjpeg.h
smjpegdec.c smjpegdec: set nb_frames for video stream 2012-11-02 16:32:51 +00:00
smjpegenc.c smjpegenc: use bits_per_coded_sample instead of calling function 2012-11-07 01:31:39 +00:00
smoothstreamingenc.c smoothstreamingenc: check return value of mkdir() 2012-10-29 03:34:17 +01:00
smush.c smush: check audio packet size 2012-11-17 19:58:54 +00:00
sol.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
sox.h
soxdec.c
soxenc.c
spdif.c
spdif.h
spdifdec.c Merge commit '8b8899ac3233b4f7af83ded0dc032fad8902d714' 2012-10-23 15:00:27 +02:00
spdifenc.c
srtdec.c lavf/srtdec: recognize subtitles starting at event index 0. 2012-11-05 07:37:45 +01:00
srtenc.c lavf/srtenc: ignore invalid timed packets instead of failing. 2012-11-10 22:43:27 +01:00
subtitles.c
subtitles.h
subviewerdec.c
swf.c
swf.h
swfdec.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
swfenc.c swfenc: zero fifo after freeing 2012-10-27 23:03:07 +02:00
takdec.c
tcp.c
thp.c
tiertexseq.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
tls.c
tmv.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
tta.c
tty.c
txd.c
udp.c udp: check ff_socket_nonblock() return code 2012-11-05 21:21:04 +01:00
url-test.c
url.h
urldecode.c
urldecode.h
utils.c lavf: let av_find_best_stream use bitrate info if available 2012-11-18 13:57:08 +01:00
vc1test.c
vc1testenc.c
version.h AST demuxer 2012-11-17 19:30:08 +00:00
voc.c
voc.h
vocdec.c
vocenc.c vocenc: fix 10l regression 2012-11-04 04:46:10 +00:00
vorbiscomment.c
vorbiscomment.h
vqf.c vqf: check samplerate, avoid division by 0. 2012-11-09 18:05:19 +01:00
wavdec.c
wavenc.c wavenc: fix curruption of metadata 2012-10-30 21:48:39 +01:00
wc3movie.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
webvttdec.c
westwood_aud.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
westwood_vqa.c
wtv.c wtv: set channel layout for mpeg audio 2012-11-12 10:33:23 -05:00
wtv.h wtv: move duplicated guids into wtv.c 2012-11-06 15:52:33 +01:00
wtvdec.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
wtvenc.c lavf/wtvenc: fix s[tp]_pairs memleak. 2012-11-13 20:02:43 +01:00
wv.c wv: use right function to read block_samples 2012-11-12 15:50:04 +00:00
wvenc.c
xa.c
xmv.c xmv: Fix integer overflow 2012-11-09 17:18:01 +01:00
xwma.c xwma: check bytes_per_sample, fix division by 0. 2012-11-15 00:56:54 +01:00
yop.c Merge remote-tracking branch 'qatar/master' 2012-11-13 11:09:38 +01:00
yuv4mpeg.c Add yuv4xxp12 and yuv4xxp14 pixel formats to y4m encoder and decoder. 2012-11-10 02:19:55 +01:00