Michael Niedermayer
676a93f2d8
avformat: Add av_program_add_stream_index()
...
This will be used by the subsequent commit(s)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-11 22:27:25 +01:00
Michael Niedermayer
cafb195604
avformat/utils: Fix "libavformat/utils.c:927:35: runtime error: signed integer overflow: -2450238577049583619 - 9223090561878065151 cannot be represented in type long long"
...
Fixes Mozilla bug 1229205
Found-by: Tyson Smith
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-04 00:44:06 +01:00
Nicolas George
3ab1e5a48c
lavf: add FFERROR_REDO to let demuxers return no packet.
2015-12-03 19:16:12 +01:00
Michael Niedermayer
ec7a3be11e
avformat/utils: Move end_time1 AV_NOPTS_VALUE Check after rescale
...
Fixes integer overflow
Fixes: 266ee543812e934f7b4a72923a2701d4/signal_sigabrt_7ffff6ae7cc9_7322_85218d61759d461bdf7387180e8000c9.ogg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-03 00:13:27 +01:00
Michael Niedermayer
d872643cfe
avformat/utils: Check AVFormatContext->duration in compute_chapters_end() before use
...
Fixes integer overflow
Fixes: 266ee543812e934f7b4a72923a2701d4/signal_sigabrt_7ffff6ae7cc9_7322_85218d61759d461bdf7387180e8000c9.ogg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-03 00:13:27 +01:00
Matthieu Bouron
72eaf72623
lavf/utils: avoid decoding a frame to get the codec parameters
...
Avoid decoding a frame to get the codec parameters while the codec
supports FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM. This is particulary useful
to avoid decoding twice images (once in avformat_find_stream_info and
once when the actual decode is made).
2015-11-26 21:50:55 +01:00
Derek Buitenhuis
ad317c94c5
Merge commit '7f4ec4364bc4a73036660c1c6a3c4801db524e9e'
...
* commit '7f4ec4364bc4a73036660c1c6a3c4801db524e9e':
avformat: expose av_stream_new_side_data helper
Conflicts:
libavformat/internal.h
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-11-22 17:19:10 +00:00
Timothy Gu
f2d9ae6e49
avformat/utils: Fix indentation
2015-11-20 21:33:46 -08:00
John Stebbins
7f4ec4364b
avformat: expose av_stream_new_side_data helper
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-18 11:36:27 +01:00
Michael Niedermayer
1ef336e912
avformat/utils: Do not init parser if probing is unfinished
...
Fixes assertion failure
Fixes: 136f8b8d47af7892306625e597dee655/signal_sigabrt_7ffff6ae7cc9_8941_ab11bea57c84796418f481f873dc31ba.dvr_ms
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-15 23:42:24 +01:00
Rainer Hochecker
2d8c2f1a28
avformat/utils: estimate_timings_from_pts - increase retry counter, fixes invalid duration for ts files with hevc codec
...
Fixes a mpegts file with hevc that fails estimating duration. Increasing number of
retries fixes the issue.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-15 15:39:23 +01:00
Hendrik Leppkes
611c22140a
Merge commit '8de1ee9f725aa3c550f425bd3120bcd95d5b2ea8'
...
* commit '8de1ee9f725aa3c550f425bd3120bcd95d5b2ea8':
lavf: deprecate compute_pkt_fields2
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-11 14:37:48 +01:00
Hendrik Leppkes
c03ffe1712
avformat/utils: re-factor freeing AVStreams
...
This matches the Libav signature and simplifies merging future changes.
2015-11-11 14:36:53 +01:00
Hendrik Leppkes
3df9ec5ce7
Merge commit 'aeda1121c91395d1f0d434bc7f227423aa2ff97d'
...
* commit 'aeda1121c91395d1f0d434bc7f227423aa2ff97d':
lavf: factor out freeing an AVStream
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 18:42:08 +01:00
Hendrik Leppkes
de0e219a8a
Merge commit 'a0c71a575109f123978e345fa7eb4ac03cd4d3c3'
...
* commit 'a0c71a575109f123978e345fa7eb4ac03cd4d3c3':
lavf: initialize cur_dts to AV_NOPTS_VALUE for muxing
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 18:23:22 +01:00
Anton Khirnov
8de1ee9f72
lavf: deprecate compute_pkt_fields2
...
All encoders set pts and dts properly now (and have been doing that for
a while), so there is no good reason to do any timestamp guessing in the
muxer.
The newly added AVStreamInternal will be later used for storing all the
private fields currently living in AVStream.
2015-11-09 07:50:55 +01:00
Anton Khirnov
aeda1121c9
lavf: factor out freeing an AVStream
...
It will be needed in other functions.
2015-11-08 11:49:23 +01:00
Anton Khirnov
a0c71a5751
lavf: initialize cur_dts to AV_NOPTS_VALUE for muxing
...
The reasoning for setting it to zero only applies to demuxing.
2015-11-08 11:48:47 +01:00
Hendrik Leppkes
55abb94b7d
avformat: unref packet after storing it in internal packet queue
...
Fixes a memory leak when using genpts
2015-11-02 09:03:56 +01:00
Hendrik Leppkes
b64fe49371
avformat: always unref the packet after parsing
...
This fixes a memory leak when side-data is present.
2015-11-02 09:03:56 +01:00
Hendrik Leppkes
54de179caa
Merge commit 'd584533cf38141172e20bae5436629ee17c8ce50'
...
* commit 'd584533cf38141172e20bae5436629ee17c8ce50':
avformat: Rework add_to_pktbuf
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-29 14:06:11 +01:00
Hendrik Leppkes
c2f861ca42
Replace remaining occurances of av_free_packet with av_packet_unref
2015-10-27 14:35:30 +01:00
Hendrik Leppkes
7f5af80ba4
Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'
...
* commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457':
avpacket: Replace av_free_packet with av_packet_unref
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-27 14:28:56 +01:00
Hendrik Leppkes
856b19d593
Merge commit 'a5d42043093a39636a1f4021a37dd9c612479f6f'
...
* commit 'a5d42043093a39636a1f4021a37dd9c612479f6f':
avformat: Always return ref-counted AVPacket
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-27 14:12:27 +01:00
Luca Barbato
d584533cf3
avformat: Rework add_to_pktbuf
...
Make it return an error and check its return value when it is used.
Simplify the usage by calling `av_packet_ref` internally when needed.
2015-10-26 18:00:55 +01:00
Luca Barbato
ce70f28a17
avpacket: Replace av_free_packet with av_packet_unref
...
`av_packet_unref` matches the AVFrame ref-counted API and can be used as
a drop in replacement.
Deprecate `av_free_packet`.
2015-10-26 18:00:55 +01:00
Luca Barbato
a5d4204309
avformat: Always return ref-counted AVPacket
...
And drop the av_dup_packet from the input_thread.
2015-10-26 18:00:55 +01:00
Rodger Combs
9825a24e5b
lavf/utils: avoid giving up probing early with long subtitle events
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-03 12:10:03 +02:00
Hendrik Leppkes
b01891a9f0
Merge commit '948f3c19a8bd069768ca411212aaf8c1ed96b10d'
...
* commit '948f3c19a8bd069768ca411212aaf8c1ed96b10d':
lavc: Make AVPacket.duration int64, and deprecate convergence_duration
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 15:22:52 +02:00
wm4
948f3c19a8
lavc: Make AVPacket.duration int64, and deprecate convergence_duration
...
Note that convergence_duration had another meaning, one which was in
practice never used. The only real use for it was a 64 bit replacement
for the duration field. It's better just to make duration 64 bits, and
to get rid of it.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-29 14:33:00 +02:00
Hendrik Leppkes
3a8e447712
lavf/utils: remove some left-over cruft from the 32-bit size fields
2015-09-17 16:54:00 +02:00
James Almer
655b6dcb34
lavc/lavf: remove incompatible abi checks for the new 64bit fields
...
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-09-17 11:36:16 -03:00
Carl Eugen Hoyos
b290972b8f
lavf: Switch probesize and max_analyze_duration to 64bit.
...
Both are only accessible through AVOptions.
2015-09-15 18:02:51 +02:00
Carl Eugen Hoyos
c311713ca9
lavf: Switch bitrate to 64bit unless compatibility with avconv was requested.
...
Based on a patch by Steve Swanson, swanysteve at gmail.
Fixes ticket #2089 .
2015-09-15 18:02:47 +02:00
Thierry Foucu
f600381b79
libavformat/utils.c: use correct variable for message.
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-11 21:25:33 +02:00
Michael Niedermayer
f58e011a1f
avformat/utils: Increase default max_stream_analyze_duration for flv
...
Fixes: unknown_video.flv
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-11 01:12:28 +02:00
Hendrik Leppkes
87c8812270
Merge commit '01bcc2d5c23fa757d163530abb396fd02f1be7c8'
...
* commit '01bcc2d5c23fa757d163530abb396fd02f1be7c8':
lavc: Drop deprecated destruct_packet related functions
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-05 16:50:09 +02:00
Marton Balint
26a0cd1b4b
lavf: add V as a video stream specifier which is not an attached picture
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2015-09-02 21:35:21 +02:00
Carl Eugen Hoyos
670d8ecfae
lavf: Remove probesize32 and max_analyze_duration32 on version bump.
...
Add FF_API_PROBESIZE_32 to allow removing 32bit probesize and 32bit
max_analyze_duration after the next libavformat version bump.
2015-09-01 09:19:49 +02:00
Vittorio Giovara
01bcc2d5c2
lavc: Drop deprecated destruct_packet related functions
...
Deprecated in 10/2012.
2015-08-28 16:01:16 +02:00
Michael Niedermayer
b4d68e7cdb
avformat: Remove use of AVFrac and AVStream->pts
...
Move field to internal part of AVStream and struct to internal.h
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-23 04:16:02 +02:00
Michael Niedermayer
29d147c94d
Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'
...
* commit '059a934806d61f7af9ab3fd9f74994b838ea5eba':
lavc: Consistently prefix input buffer defines
Conflicts:
doc/examples/decoding_encoding.c
libavcodec/4xm.c
libavcodec/aac_adtstoasc_bsf.c
libavcodec/aacdec.c
libavcodec/aacenc.c
libavcodec/ac3dec.h
libavcodec/asvenc.c
libavcodec/avcodec.h
libavcodec/avpacket.c
libavcodec/dvdec.c
libavcodec/ffv1enc.c
libavcodec/g2meet.c
libavcodec/gif.c
libavcodec/h264.c
libavcodec/h264_mp4toannexb_bsf.c
libavcodec/huffyuvdec.c
libavcodec/huffyuvenc.c
libavcodec/jpeglsenc.c
libavcodec/libxvid.c
libavcodec/mdec.c
libavcodec/motionpixels.c
libavcodec/mpeg4videodec.c
libavcodec/mpegvideo.c
libavcodec/noise_bsf.c
libavcodec/nuv.c
libavcodec/nvenc.c
libavcodec/options.c
libavcodec/parser.c
libavcodec/pngenc.c
libavcodec/proresenc_kostya.c
libavcodec/qsvdec.c
libavcodec/svq1enc.c
libavcodec/tiffenc.c
libavcodec/truemotion2.c
libavcodec/utils.c
libavcodec/utvideoenc.c
libavcodec/vc1dec.c
libavcodec/wmalosslessdec.c
libavformat/adxdec.c
libavformat/aiffdec.c
libavformat/apc.c
libavformat/apetag.c
libavformat/avidec.c
libavformat/bink.c
libavformat/cafdec.c
libavformat/flvdec.c
libavformat/id3v2.c
libavformat/isom.c
libavformat/matroskadec.c
libavformat/mov.c
libavformat/mpc.c
libavformat/mpc8.c
libavformat/mpegts.c
libavformat/mvi.c
libavformat/mxfdec.c
libavformat/mxg.c
libavformat/nutdec.c
libavformat/oggdec.c
libavformat/oggparsecelt.c
libavformat/oggparseflac.c
libavformat/oggparseopus.c
libavformat/oggparsespeex.c
libavformat/omadec.c
libavformat/rawdec.c
libavformat/riffdec.c
libavformat/rl2.c
libavformat/rmdec.c
libavformat/rtpdec_latm.c
libavformat/rtpdec_mpeg4.c
libavformat/rtpdec_qdm2.c
libavformat/rtpdec_svq3.c
libavformat/sierravmd.c
libavformat/smacker.c
libavformat/smush.c
libavformat/spdifenc.c
libavformat/takdec.c
libavformat/tta.c
libavformat/utils.c
libavformat/vqf.c
libavformat/westwood_vqa.c
libavformat/xmv.c
libavformat/xwma.c
libavformat/yop.c
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 23:15:19 +02:00
Michael Niedermayer
444e9874a7
Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'
...
* commit 'def97856de6021965db86c25a732d78689bd6bb0':
lavc: AV-prefix all codec capabilities
Conflicts:
cmdutils.c
ffmpeg.c
ffplay.c
libavcodec/8svx.c
libavcodec/aacenc.c
libavcodec/ac3dec.c
libavcodec/adpcm.c
libavcodec/alac.c
libavcodec/atrac3plusdec.c
libavcodec/bink.c
libavcodec/dnxhddec.c
libavcodec/dvdec.c
libavcodec/dvenc.c
libavcodec/ffv1dec.c
libavcodec/ffv1enc.c
libavcodec/fic.c
libavcodec/flacdec.c
libavcodec/flacenc.c
libavcodec/flvdec.c
libavcodec/fraps.c
libavcodec/frwu.c
libavcodec/gifdec.c
libavcodec/h261dec.c
libavcodec/hevc.c
libavcodec/iff.c
libavcodec/imc.c
libavcodec/libopenjpegdec.c
libavcodec/libvo-aacenc.c
libavcodec/libvorbisenc.c
libavcodec/libvpxdec.c
libavcodec/libvpxenc.c
libavcodec/libx264.c
libavcodec/mjpegbdec.c
libavcodec/mjpegdec.c
libavcodec/mpegaudiodec_float.c
libavcodec/msmpeg4dec.c
libavcodec/mxpegdec.c
libavcodec/nvenc_h264.c
libavcodec/nvenc_hevc.c
libavcodec/pngdec.c
libavcodec/qpeg.c
libavcodec/ra288.c
libavcodec/rv10.c
libavcodec/s302m.c
libavcodec/sp5xdec.c
libavcodec/takdec.c
libavcodec/tiff.c
libavcodec/tta.c
libavcodec/utils.c
libavcodec/v210dec.c
libavcodec/vp6.c
libavcodec/vp9.c
libavcodec/wavpack.c
libavcodec/yop.c
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 22:50:18 +02:00
Vittorio Giovara
059a934806
lavc: Consistently prefix input buffer defines
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:59 +01:00
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
Michael Niedermayer
4afc3429be
avformat/utils: Fix regression with H264 stream probing
...
Fixes Ticket4725
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-16 03:37:43 +02:00
Michael Niedermayer
cdca400c5e
avformat/utils: Print stream number in max_analyze_duration exit path
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-16 03:30:24 +02:00
Michael Niedermayer
90dd6ad22c
avformat/utils: inform the user if the protocol cannot be determined
...
Assuming the wrong protocol can lead to suboptimal seeking performance
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-15 04:09:09 +02:00
Michael Niedermayer
901922e047
avformat/utils: adjust short skip threshold in ff_configure_buffers_for_index() to avoid seeking if a packet is skiped
...
Fixes Ticket4126
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-15 03:35:08 +02:00
wm4
130a8e0eef
avformat: don't crash API users when demuxing mp4
...
This code is one big chunk of WTF.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-14 22:41:35 +02:00