summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
Commit message (Collapse)AuthorAge
* avformat: use ff_alloc_extradata()Paul B Mahol2013-10-13
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avformat: add ff_alloc_extradata() helperPaul B Mahol2013-10-13
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avformat: add support to force specific AVCodecsMichael Niedermayer2013-10-02
| | | | | | | | previously only codec_ids could be forced, which did not allow forcing a specific implementation like libopenjpeg vs jpeg2000. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/utils: pass AVFormatContext to find_decoder()Michael Niedermayer2013-10-02
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/utils: factor find_decoder() outMichael Niedermayer2013-09-28
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit 'ce67f442be0f6c4a8794272873852e256b5b8ee4'Michael Niedermayer2013-09-23
|\ | | | | | | | | | | | | | | | | | | * commit 'ce67f442be0f6c4a8794272873852e256b5b8ee4': lavf: Avoid setting avg_frame_rate if delta_dts is negative Conflicts: libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: Avoid setting avg_frame_rate if delta_dts is negativeMartin Storsjö2013-09-22
| | | | | | | | | | | | | | | | | | This avoids setting avg_frame_rate to invalid (negative) values. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat: remove duplicate includesMichael Niedermayer2013-09-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: remove unused variableMichael Niedermayer2013-09-20
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '5626f994f273af80fb100d4743b963304de9e05c'Michael Niedermayer2013-09-19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '5626f994f273af80fb100d4743b963304de9e05c': avformat: Use av_reallocp() where suitable Conflicts: libavformat/avidec.c libavformat/avienc.c libavformat/aviobuf.c libavformat/oggparsevorbis.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Use av_reallocp() where suitableAlexandra Khirnova2013-09-18
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | avformat/utils: Print warning if reallocating probe buffer failedMichael Niedermayer2013-09-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '68b467742092364f9306283f40effde2c12efe08'Michael Niedermayer2013-09-17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '68b467742092364f9306283f40effde2c12efe08': lavf: Make probe_codec return an error code Conflicts: libavformat/utils.c A failure to reallocate should not free the array as it is used to probe the codec. And failure to reallocate if the following probe succeeds isnt a fatal error for probe_codec(). Thus this is only partially merged to ensure probing still is attempted with the data available. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: Make probe_codec return an error codeAlexandra Khirnova2013-09-16
| | | | | | | | | | | | This allows handling errors from av_realloc properly. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Do not suggest to increase probesize for image2 files.Carl Eugen Hoyos2013-09-17
| |
* | avformat/utils: use av_realloc_array()Michael Niedermayer2013-09-11
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: functions that add entries should not destroy the whole list ↵Michael Niedermayer2013-09-11
| | | | | | | | | | | | | | | | | | | | | | on failure The caller does not expect this, and in case of adding new streams would then not even be able to deallocate them anymore. This reverts a hunk from "avformat: Use av_reallocp_array() where suitable" Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'f369b9356c4606cd4d713d60f7db5de119d901fa'Michael Niedermayer2013-09-11
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'f369b9356c4606cd4d713d60f7db5de119d901fa': avformat: Use av_reallocp_array() where suitable Conflicts: libavformat/asfenc.c libavformat/gxfenc.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Use av_reallocp_array() where suitableAlexandra Khirnova2013-09-10
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-09-08
|\| | | | | | | | | | | | | | | | | | | | | * qatar/master: lavf: fix the comparison in an overflow check Conflicts: libavformat/utils.c See: a5d67bc796e1f9a2b99b43ea807166b655e4bdbc Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: fix the comparison in an overflow checkAnton Khirnov2013-09-07
| | | | | | | | | | | | CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avformat: make avformat_close_input() more tolerant.Clément Bœsch2013-09-04
| | | | | | | | | | The purpose of this commit is to make error management simpler and less error prone, just like av_free() which is safe with NULL.
* | avformat/utils: assert position monotonicity in ff_find_last_ts()Michael Niedermayer2013-09-04
| | | | | | | | | | | | | | This ensures that no read timestamp functions finds packets before the search window in ff_find_last_ts() which could cause an infinite loop Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: Fix bitrate overflow checkMichael Niedermayer2013-09-03
| | | | | | | | | | | | | | | | | | The check added in df33a58e5311ee9a64a573889b883a80e981af7b does not work at all, rather it broke the summing of bitrates completely. The comparission was wrong way around. This commit replaces it by a simpler and hopefully clearer check Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'df33a58e5311ee9a64a573889b883a80e981af7b'Michael Niedermayer2013-09-03
|\| | | | | | | | | | | | | * commit 'df33a58e5311ee9a64a573889b883a80e981af7b': lavf: avoid integer overflow when estimating bitrate Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: avoid integer overflow when estimating bitrateAnton Khirnov2013-09-02
| | | | | | | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* | Merge commit 'fab694dd3931b1c0bc3c598c3f88b1902c14a303'Michael Niedermayer2013-09-03
|\| | | | | | | | | | | | | | | | | | | * commit 'fab694dd3931b1c0bc3c598c3f88b1902c14a303': lavf: move a variable declaration to the block where it's used Conflicts: libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: move a variable declaration to the block where it's usedAnton Khirnov2013-09-02
| |
* | avformat/utils: fix duration_fields calculation when need_parsing=0Michael Niedermayer2013-09-01
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: fix av_probe_input_buffer2() so it returns the probe scoreMichael Niedermayer2013-08-29
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: export probe scoreMichael Niedermayer2013-08-28
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: move PROBE_BUF_M* to internal.hMichael Niedermayer2013-08-26
| | | | | | | | | | | | They will be used by the mp3 probe function in the next commit Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Remove FF_API_PKT_DUMP cruft. Not compiled since libavformat 54.Alexis Ballier2013-08-13
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Integrate accessors.h header into internal.hReimar Döffinger2013-08-10
| | | | | | | | | | | | | | I have no idea why I added a separate header, I think there is no good reason for it. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Reduce MAKE_ACCESSORS code duplication via a new header.Reimar Döffinger2013-08-08
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | avformat/utils: fix memleak with nobufferMichael Niedermayer2013-08-07
| | | | | | | | | | | | Fixes Ticket2802 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '7950e519bb094897f957b9a9531cc60ba46cbc91'Michael Niedermayer2013-08-03
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7950e519bb094897f957b9a9531cc60ba46cbc91': Disable deprecation warnings for cases where a replacement is available Conflicts: libavcodec/avpacket.c libavcodec/pthread.c libavcodec/utils.c libavdevice/v4l2.c libavfilter/avfiltergraph.c libavfilter/buffersrc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Disable deprecation warnings for cases where a replacement is availableDiego Biurrun2013-08-02
| |
* | Merge commit 'c5b46a064d9991f2cd045c90179fccf35ecffc34'Michael Niedermayer2013-07-29
|\| | | | | | | | | | | | | | | | | | | * commit 'c5b46a064d9991f2cd045c90179fccf35ecffc34': lavf: Don't interpret just slightly broken timestamps as wraparound Conflicts: libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: Don't interpret just slightly broken timestamps as wraparoundMichael Niedermayer2013-07-29
| | | | | | | | | | | | | | This avoids breaking some slightly incorrect (dts > pts) timestamps in sample HLS streams from Apple. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Revert "avformat/utils: Close codec context since it is allocated by ↵Michael Niedermayer2013-07-21
| | | | | | | | | | | | | | | | | | | | | | | | avformat_new_stream in refrence to ticket 2716" This causes a race condition with VLC. Its plausible that other applications also would have races with it and its just fixing a memleak when the user application forgets to free the codec. It causes more problems than it solves in its current form, thus the revert. Better solutions are welcome This reverts commit 0f229f9b91fe3c4ebd97e88f004d638819b76add.
* | avformat/utils: Close codec context since it is allocated by ↵Anshul Maheshwari2013-07-21
| | | | | | | | | | | | avformat_new_stream in refrence to ticket 2716 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-07-16
|\| | | | | | | | | | | | | * qatar/master: lavf: Make sure avg_frame_rate can be calculated without integer overflow Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: Make sure avg_frame_rate can be calculated without integer overflowMartin Storsjö2013-07-15
| | | | | | | | | | | | | | | | | | If either of the deltas is too large for the multiplications to succeed, don't use this for setting the avg frame rate. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Cc: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'cehoyos/master'Michael Niedermayer2013-07-10
|\ \ | | | | | | | | | | | | | | | | | | | | | * cehoyos/master: Suggest recompilation with openssl or gnutls if the https protocol is not found. lavf/utils.c: Avoid a null pointer dereference on oom after duration_error allocation. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * | lavf/utils.c: Avoid a null pointer dereference on oom after duration_error ↵Carl Eugen Hoyos2013-07-10
| | | | | | | | | | | | allocation.
* | | avformat/utils: avformat_find_stream_info set value for ret in case of oomPiotr Bandurski2013-07-10
|/ / | | | | | | | | | | without it FFmpeg didn't display any error message when oom event occured Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: avformat_find_stream_info fix a crash in case of oomPiotr Bandurski2013-07-10
| | | | | | | | | | | | fixes ticket #2767 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat_find_stream_info: fallback to timestamps in analyzeduration check ↵Michael Niedermayer2013-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | in more cases This fixes speex in rtmp Fixes Ticket2409 the nellymoser in flv case actually needs larger analyzeduration. The code previously just failed to calculate the duration If this causes any problems, like premature analyze/probe end, please report! Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat_find_stream_info: use fps_dts as last resort to determine durationMichael Niedermayer2013-07-07
| | | | | | | | | | | | Fixes long delay with some hardware generated h264 in ts Signed-off-by: Michael Niedermayer <michaelni@gmx.at>