summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* lavfi/dnn/dnn_backend_native: fix memory leak in error pathJun Zhao2019-08-201-0/+4
| | | | | | | fix memory leak in error path Reviewed-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavfi/avfiltergraph: add check before free the formatJun Zhao2019-08-201-2/+4
| | | | | | | | ff_merge_samplerates will be deallocate a or b in some case, so add a check before free the format. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavfi/af_adeclick: fix double free after ff_filter_frame failJun Zhao2019-08-201-1/+1
| | | | | | | | ff_filter_frame fail will free the frame, so we just returen after this function fail. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* avformat/hlsenc: reindent codeSteven Liu2019-08-201-35/+32
| | | | and remove redundant empty line
* avformat/hlsenc: remove unuse comment of the codeSteven Liu2019-08-201-1/+0
|
* lavf/hlsenc: free the old_filname to avoid memory leakJun Zhao2019-08-201-0/+1
| | | | | | | | free the old_filname to avoid memory leak in error handle path. Reviewed-by: Steven Liu <lq@onvideo.cn> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/hlsenc: fix one warning: unused variable 'filename' [-Wunused-variable]Limin Wang2019-08-201-1/+1
| | | | | Reviewed-by: Steven Liu <lq@onvideo.cn> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* FATE/dnn: let fate/dnn tests depend on ffmpeg static librariesGuo, Yejun2019-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | background: DNN (deep neural network) is a sub module of libavfilter, and FATE/dnn is unit test for the DNN module, one unit test for one dnn layer. The unit tests are not based on the APIs exported by libavfilter, they just directly call into the functions within DNN submodule. There is an issue when run the following command: build$ ../ffmpeg/configure --disable-static --enable-shared make make fate-dnn-layer-pad And part of error message: tests/dnn/dnn-layer-pad-test.o: In function `test_with_mode_symmetric': /work/media/ffmpeg/build/src/tests/dnn/dnn-layer-pad-test.c:73: undefined reference to `dnn_execute_layer_pad' The root cause is that function dnn_execute_layer_pad is a LOCAL symbol in libavfilter.so, and so the linker could not find it when build dnn-layer-pad-test. To check it, just run: readelf -s libavfilter/libavfilter.so | grep dnn So, add dependency in fate/dnn Makefile with ffmpeg static libraries. This is the same method used in fate/checkasm Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* libavfilter/dnn/dnn_backend_tf: add tf.pad support for tensorflow backend ↵Guo, Yejun2019-08-191-29/+19
| | | | | | | with native model. Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* libavfilter/dnn/dnn_backend_tf: fix typo that variable uninitialized.Guo, Yejun2019-08-191-0/+1
| | | | | | | | | if it is initialized randomly, the tensorflow lib will report error message such as: Attempt to add output -7920 of depth_to_space4 not in range [0, 1) to node with type Identity Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* avfilter/vf_v360: add dual fisheye formatEugene Lyapustin2019-08-192-0/+83
| | | | Signed-off-by: Eugene Lyapustin <unishifft@gmail.com>
* avfilter/vf_v360: add padding option for cubemapEugene Lyapustin2019-08-192-25/+93
| | | | Signed-off-by: Eugene Lyapustin <unishifft@gmail.com>
* avfilter: add v360 filterEugene Lyapustin2019-08-194-0/+1996
| | | | Signed-off-by: Eugene Lyapustin <unishifft@gmail.com>
* avcodec/anm: Check input size for a frame with just a stop codeMichael Niedermayer2019-08-181-0/+3
| | | | | | | | | Fixes: Timeout (11sec -> 6sec) Fixes: 16344/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ANM_fuzzer-5673032000995328 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/hlsenc: merge mpegts and fmp4 workflow to one workflowSteven Liu2019-08-181-127/+124
| | | | | | | | write mpegts or fmp4 context into buffer, and flush the buffer into output file when split fragment. merge two format split workflow into one workflow Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* lavf/dump: use error log level for invalid sizeLimin Wang2019-08-181-6/+6
| | | | | Reviewed-by: Steven Liu <lq@onvideo.cn> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/showinfo: support Content Light Level informationLimin Wang2019-08-171-0/+12
| | | | | | | show real information instead of the unknown side data type message for HDR10 stream Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avio: remove 4k limit from avio_printfMarton Balint2019-08-174-7/+19
| | | | | | | | We do this by switching to AVBPrint. v2: Also set IO context error flag in case of ENOMEM. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/assenc: optimize writing dialogsMarton Balint2019-08-171-1/+1
| | | | | | | | An example where the preivously added API can be useful. Also fixes ticket #6390. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/avio: add avio_print_string_array and avio_printMarton Balint2019-08-174-1/+27
| | | | | | | These functions can be used to print a variable number of strings consecutively to the IO context. Unlike av_bprintf, no temporary buffer is necessary. Signed-off-by: Marton Balint <cus@passwd.hu>
* fate: add accurate_rnd+bitexact sws_flags for fate-gifencLimin Wang2019-08-176-861/+861
| | | | | | | This fixes make fate issue for frame thread scale in my local testing Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/f_select: yuv will use Y plane only for scenecut detectLimin Wang2019-08-172-9/+13
| | | | | | | | | | | | | | | | At the moment scene change detection score uses all planes to detect scene changes. In this regard this is similar how the frozen frames detection works. However, in classic encoding scene change detection typically only uses the Y plane. We might get more resonable scores for scene change if we also use only the Y plane for calculating the score if the pixel format is YUV. Although this will require additional work once packed YUV formats are added, because for the moment the generic scene sad score calculation has no way to ignore some components in a packed format. Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/matroskadec: Fix seekingAndreas Rheinhardt2019-08-161-1/+1
| | | | | | | | | | | | | | | | | matroska_reset_status (a function that is used during seeking (among other things)) used an int for the return value of avio_seek which returns an int64_t. Checking the return value then indicated an error even though the seek was successfull for targets in the range of 2GB-4GB, 6GB-8GB, ... This error implied that the status hasn't been reset and in particular, the old level was still considered to be in force, so that ebml_parse returned errors because the newly parsed elements were of course not contained in the previously active and still wrongly considered active master element any more. Addresses ticket #8084. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* convert_from_tensorflow.py: support conv2d with dilationGuo, Yejun2019-08-151-21/+59
| | | | | | | | | conv2d with dilation > 1 generates tens of nodes in graph, it is not easy to parse each node one by one, so we do special tricks to parse the conv2d layer. Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* convert_from_tensorflow.py: add option to dump graph for visualization in ↵Guo, Yejun2019-08-152-7/+12
| | | | | | | tensorboard Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* aarch64/opusdsp: do not clobber register v8Lynne2019-08-151-4/+4
| | | | A part of v8-v15 needs to be preserved across calls.
* libavdevice: Update the class name as uniform styleJun Zhao2019-08-1512-12/+12
| | | | | | | Update the class name to uniform indev/outdev style. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/utils: fix error like "offset 0x1f85: partial file"tomajsjiang2019-08-151-1/+7
| | | | | | | | | fix error like "offset 0x1f85: partial file", the root cause is when read the mp4 file from http, and the moov in the end of the mp4 file, reconfig the buffer will drop some data. Signed-off-by: Jun Zhao <barryjzhao@tencent.com> Signed-off-by: Zhongxing Jiang <tomajsjiang@tencent.com>
* lavf/avio: add a ffio_realloc_buf API for AVIO buffer realloctomajsjiang2019-08-152-0/+40
| | | | | | Add new API ffio_realloc_buf for AVIO buffer realloc. Signed-off-by: Zhongxing Jiang <tomajsjiang@tencent.com>
* avcodec/libdav1d: allow setting frame size limit in pixelsJames Almer2019-08-142-1/+2
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/mips: remove redundant code in TRANSPOSE16x8_UB_UB.Shiyou Yin2019-08-151-2/+0
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mux: Use av_packet_rescale_tsAndreas Rheinhardt2019-08-151-12/+4
| | | | | | | | | ff_write_chained essentially duplicated the functionality of av_packet_rescale_ts. This has been changed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mux: Use const AVPacket * in compare functionsAndreas Rheinhardt2019-08-156-9/+11
| | | | | | | | | There is no reason for these functions to modify the given packets at all. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/flicvideo: Optimize and Simplify FLI_COPY in ↵Michael Niedermayer2019-08-151-8/+1
| | | | | | | | | | | flic_decode_frame_24BPP() by using bytestream2_get_buffer() Fixes: Timeout (31sec -> 22sec) Fixes: 16217/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FLIC_fuzzer-5658084189405184 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/loco: Check left column valueMichael Niedermayer2019-08-151-0/+2
| | | | | | | | | Fixes: Timeout (42sec -> 379 ms) Fixes: 16323/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LOCO_fuzzer-5679178099195904 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: adjust pixel threshold for MSRLE, as it allows ↵Michael Niedermayer2019-08-151-0/+1
| | | | | | | | | | | coding gigantic images on tiny input Fixes: Timeout (12sec ->2sec) Fixes: 16125/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSRLE_fuzzer-5650846364205056 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fftools: Use right function signature and pointersAndreas Rheinhardt2019-08-153-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The option tables of the various fftools (in particular ffprobe) are arrays of OptionDef; said type contains a union of a pointer to void and a function pointer of type int (*)(void *, const char *, const char *) as well as a size_t. Some entries (namely the common entry for writing a report as well as several more of ffprobe's entries) used the pointer to void to store a pointer to functions of type int (*)(const char *) or type int (*)(const char *, const char *); nevertheless, when the functions are actually called in write_option (in cmdutils.c), it is done via a pointer of the first type. There are two things wrong here: 1. Pointer to void can be converted to any pointer to incomplete or object type and back; but they are nevertheless not completely generic pointers: There is no provision in the C standard that guarantees their convertibility with function pointers. C90 lacks a generic function pointer, C99 made every function pointer a generic function pointer and still disallows the convertibility with void *. 2. The signature of the called function differs from the signature of the pointed-to type. This is undefined behaviour in C99 (given that C90 lacks a way to convert function pointers at all, it doesn't say anything about such a situation). It only works because none of the functions this patch is about make any use of their parameters at all. Therefore this commit changes the type of the relevant functions to match the type used for the call and uses the union's function pointer to store it. This is legal even in C90. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffwavesynth: Fixes invalid shift with pink noise seekingMichael Niedermayer2019-08-151-1/+1
| | | | | | | | | Fixes: left shift of negative value -961533698048 Fixes: 16242/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFWAVESYNTH_fuzzer-5738550670131200 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffwavesynth: Fix integer overflow for some corner case valuesMichael Niedermayer2019-08-151-2/+2
| | | | | | | | Fixes: left shift of negative value -14671840 Fixes: 16000/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFWAVESYNTH_fuzzer-5145977817661440 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mpegtsenc: remove deprecated resend_headers optionMarton Balint2019-08-142-17/+0
| | | | | | Deprecated since 2014. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegtsenc: fix PCR generation intervalsMarton Balint2019-08-141-36/+54
| | | | | | | | | | | | | | | | | | | | | | | | PCR generation was based on counting packets for both CBR and VBR streams. Couting packets might have worked for CBR streams (when muxrate was specified) but it only took into account the packets of a service (or the packets of the PCR stream lately), so even that was problematic for multi program streams. The new code works on actual timestamps for both CBR and VBR streams. For VBR streams the behaviour of the old code is simulated by selecting a PCR interval which is the highest multiple of the frame duration but still less than 100 ms. It should be trivial to add support for setting the PCR interval for VBR streams as well in a later patch. The accuracy of PCR packets for CBR streams was greatly improved by preemtively sending them at PCR intervals even if sending the payload of another stream is in progress. This may fix these tickets: - #5750 - #7524 Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegtsenc: use increasing numbers in default service namesMarton Balint2019-08-141-2/+4
| | | | | | Maybe we should use service ID instead of increasing numbers? Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegtsenc: remove section_write_packet forward declarationMarton Balint2019-08-141-26/+24
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegtsenc: factorize setting up servicesMarton Balint2019-08-141-41/+25
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegtsenc: fix incorrect PCR selection with multiple programsMarton Balint2019-08-141-64/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MPEG-TS muxer had a serious bug related to the use of multiple programs: in that case, the PCR pid selection was incomplete for all services except one. This patch solves this problem and selects a stream to become PCR for each service, preferably the video stream. This patch also moves pcr calculation attributes to MpegTSWriteStream from MpegTSService. PCR is a per-stream and not per-service thing, so it was misleading to refer to it as something that is per-service. Also remove *service from MpegTSWriteStream because a stream can belong to multiple services so it was misleading to select one for each stream. You can check the result with this example command: ./ffmpeg -loglevel verbose -y -f lavfi -i \ "testsrc=s=64x64:d=10,split=2[out0][tmp1];[tmp1]vflip[out1];sine=d=10,asetnsamples=1152[out2]" \ -flags +bitexact -fflags +bitexact -sws_flags +accurate_rnd+bitexact \ -codec:v libx264 -codec:a mp2 -pix_fmt yuv420p \ -map '0:v:0' \ -map '0:v:1' \ -map '0:a:0' \ -program st=0:st=2 -program st=1:st=2 -program st=2 -program st=0 -f mpegts out.ts You should now see this: [mpegts @ 0x37505c0] service 1 using PCR in pid=256 [mpegts @ 0x37505c0] service 2 using PCR in pid=257 [mpegts @ 0x37505c0] service 3 using PCR in pid=258 [mpegts @ 0x37505c0] service 4 using PCR in pid=256 Fixes ticket #8039. v2: a video is stream is preferred if there are no programs, just like before the patch. Signed-off-by: Marton Balint <cus@passwd.hu>
* ffplay: properly detect all window size changesMarton Balint2019-08-141-1/+1
| | | | | | | | | | | | | | SDL_WINDOWEVENT_SIZE_CHANGED should be used instead of SDL_WINDOWEVENT_RESIZED because SDL_WINDOWEVENT_RESIZED is only emitted if the resize happened due to an external event. Fixes ticket #8072. Additional references: https://bugzilla.libsdl.org/show_bug.cgi?id=4760 https://wiki.libsdl.org/SDL_WindowEventID Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/vf_convolution: Fix build failuresAndreas Rheinhardt2019-08-141-2/+3
| | | | | | | | | | | | | | | 98e419cb added SIMD for the convolution filter for x64 systems. As usual, it used a check of the form if (ARCH_X86_64) ff_convolution_init_x86(s); and thereby relied on the compiler eliminating this pseudo-runtime check at compiletime for non x64 systems (for which ff_convolution_init_x86 isn't defined) to compile. But vf_convolution.c contains more than one filter and if the convolution filter is disabled, but one of the other filters (prewitt, sobel, roberts) is enabled, the build will fail on x64, because ff_convolution_init_x86 isn't defined in this case. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/indeo2: Check remaining input more oftenMichael Niedermayer2019-08-131-5/+6
| | | | | | | | Fixes: Timeout (95sec -> 30ms) Fixes: 14765/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO2_fuzzer-5692455527120896 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpe Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/diracdec: Check that slices are fewer than pixelsMichael Niedermayer2019-08-131-1/+3
| | | | | | | | Fixes: Timeout (197sec ->144ms) Fixes: 15034/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5733549405110272 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Print max_pixels and iterations at the endMichael Niedermayer2019-08-131-0/+2
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
OpenPOWER on IntegriCloud