Fixes ticket #1935.
Signed-off-by: Peter Ross <pross@xvid.org>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Without the information, application may choose audio from one variant
and video from another variant, which leads to fetch two variants from
network. This enables av_find_best_stream() to find matching audio and
video streams, so that only one variant is fetched from network.
Signed-off-by: LYF <yefei.li@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
From the M3U8 specification:
|The EXT-X-MEDIA-SEQUENCE tag indicates the sequence number of the first
|URI that appears in a Playlist file.
Previously it was using the list index number. Also remove now unused
list_count field.
The segment muxer presumes the use of AVFMT_GLOBALHEADER, ssegment should
be use in case of formats which requires no global headers.
Regression introduced when merging
0826d8513d.
The muxer add them automatically, so this avoid having a bunch of line
breaks all over the output files. One '\n' is still kept/added because
the lavc subrip decoder seems to have trouble with line ending abruptly
(it doesn't flush correctly the tags). This bug is harmless but should
be fixed; though, this doesn't look like a trivial change. When this bug
gets fixed, we can consider removing the '\n' at the end of the packet.
The 2048B buffer limit was also removed while moving to AVBPrint API.
Note that this doesn't really matter since the decoder is limited as
well.
Some muxers do not allow stream if codec_tag is incompatible.
Sometimes the passed input codec's codec_tag is not compatible with the
output muxer.
Because the codec_tag field of the segment muxer cannot be set, ffmpeg.c
doesn't know how to handle these cases.
Signed-off-by: ChanMin Kim <kcm1700@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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>
I was unable to find a file that needs this hack, if you have one please
contact us!
Fixes out of array accesses.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Matrox XMIO capture boards write files with major brand "JUNK"
and compatible brand "qt " that contain QuickTime version 1
audio fields.
Fixes ticket #1881.
* qatar/master:
bgmc: Fix av_malloc checks in ff_bgmc_init()
rtp: set the payload type as stream id
Conflicts:
libavformat/rtpenc_chain.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '3b4296f41473a5b39e84d7a49d480624c9c60040':
avformat: clarify stream id for muxing
fate: Add dependencies for aac, alac, amrnb, amrwb, atrac tests
ppc: do not pass redundant compiler flags
avutil: change GET_UTF8 to not use av_log2()
segment: fix NULL pointer dereference in seg_write_header()
Conflicts:
tests/fate/aac.mak
Merged-by: Michael Niedermayer <michaelni@gmx.at>