summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* avformat/rmdec.c: fix brackets around argumentsJames Almer2019-09-15
| | | | | | Regression since 78f52b4fe3 Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/rmdec.c: fix left shift of negative value in rm_sync()James Almer2019-09-15
| | | | | | | Fixes ticket 8143. Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/hlsenc: make fix code style of hls_write_trailerSteven Liu2019-09-14
| | | | change vs->avf to oc
* avformat/dashdec: reindent code at parse_manifestSteven Liu2019-09-14
|
* lavf/hls: fix memory leak in error handling path for option tmpJun Zhao2019-09-14
| | | | | | | fix memory leak in error handling path for option tmp. Reviewed-by: Steven Liu <lq@onvideo.cn> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/hls: remove redundancy seekable settingJun Zhao2019-09-14
| | | | | | | | ffio_init_context with NULL seek callback will setting seekable with 0, so remove the redundancy seekable setting. Reviewed-by: Steven Liu <lq@onvideo.cn> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/hls: drop unnecessary check before ff_format_io_closeJun Zhao2019-09-14
| | | | | | | | ff_format_io_close will check the AVIOContext pointer pb, so drop the unnecessary check before ff_format_io_close. Reviewed-by: Steven Liu <lq@onvideo.cn> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/hls: refine the log messageJun Zhao2019-09-14
| | | | | | | refine the log message, it's will help the debugging Reviewed-by: Steven Liu <lq@onvideo.cn> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* avformat/hlsenc: Fix memleak when using single_fileAndreas Rheinhardt2019-09-14
| | | | | | | | | | This commit fixes a memleak in the hls muxer when one uses a single file as output. It has been forgotten to free the temporary buffers used to write the packets so that the size of the leaks basically amounts to the size of the output file. This commit adds the necessary free. Reviewed-by: Steven Liu <lq@onvideo.cn> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* hlsenc: flush segments to guarantuee atomic single file hlsDaniel Oberhoff2019-09-14
|
* avformat/sccdec: remove not needed codePaul B Mahol2019-09-13
|
* avformat/dashdec: add startNumber parser for segmentlistSteven Liu2019-09-12
| | | | | | | | and get start_number for compute current segment number. fix ticket: 7976 Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/hlsenc: fix memleak at hls_write_trailerSteven Liu2019-09-12
| | | | | Found-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/hlsenc: print warning at the end when upload the last segment failedSteven Liu2019-09-12
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/hlsenc: merge fmp4 and mpegts segment type m3u8 list AVIOConextSteven Liu2019-09-12
| | | | | | | hlsenc has been merge fmp4 and mpegts workflow before so it can merge m3u8 list AVIOContext now. Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* lavf/avidec: fix memory leak in error handling pathJun Zhao2019-09-10
| | | | | | | free the value in error handling path to avoid the memory leak. Signed-off-by: Jun Zhao <barryjzhao@tencent.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/vividas: check for tiny blocks using alignmentMichael Niedermayer2019-09-06
| | | | | | | | | Ask for a sample for these Fixes: out of array access Fixes: 16624/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5762455661182976 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/rawenc: Only accept the appropriate stream type for raw muxers.Carl Eugen Hoyos2019-09-06
| | | | | | This does not affect the rawvideo muxer. Fixes ticket #7979.
* avformat/hlsenc: fix compiling error of hlsencSteven Liu2019-09-06
|
* avformat/hlsenc: fix code styleSteven Liu2019-09-06
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/hlsenc: move the warning message from every segment upload to init partSteven Liu2019-09-06
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/hlsenc: avformat/hlsenc: reopen new http session for http_persistentSteven Liu2019-09-06
| | | | | | | | fix ticket: 7975 Tested-by: Ian Klassen <ian@virtualfunc.com> Suggested-by: Ian Klassen <ian@virtualfunc.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/http: add ff_http_get_shutdown_status api for check the status of ↵Steven Liu2019-09-06
| | | | | | | | | shutdown this function is used to get the previous shutdown status when reusing the old connection in block mode. Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/mxfenc: fix warning: unused function 'klv_ber_length' ↵Limin Wang2019-09-04
| | | | | | [-Wunused-function] Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/matroskadec: use av_fast_realloc to reallocate ebml list arraysJames Almer2019-09-04
| | | | | | | | | | Speeds up the process considerably. Fixes ticket #8109. Suggested-by: nevcairiel Suggested-by: cehoyos Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: use proper types for some EbmlSyntax fieldsJames Almer2019-09-04
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mpegts: Check if ready on SCTE receptionAnthony Delannoy2019-09-03
| | | | | | | | On some DVB stream SCTE-35 data packet are available before the end of MpegTSContext initialization. We have to check if it is the case to avoid a SEGFAULT. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat: Add ZeroMQ as a protocolAndriy Gelman2019-09-02
| | | | | | | | | When ffmpeg was streaming, multiple clients were only supported by using a multicast destination address. An alternative was to stream to a server which re-distributes the content. This commit adds ZeroMQ as a protocol, which allows multiple clients to connect to a single ffmpeg instance. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegtsenc: fix flushing of audio packetsMarton Balint2019-09-02
| | | | | | | | | | | | | | | | | | | | | | | | 7d097a0fc57f0fa8385962a539c657c2f40b5ed0 had the same purpose as 3700f655c55e2001b57215210b957b169d66b50f but the former is much simpler, so let's remove the latter. Unfortunately both checks were wrong, because in order to make sure DTS > PCR we have to give us some headroom, so instead of using a dts_difference < max_delay check let's use a dts_difference < max_delay/2 check. Fixes DTS < PCR errors with this command line: ./ffmpeg -loglevel verbose -y -f lavfi -i \ "testsrc=s=64x64:d=20,split=2[out0][tmp1];[tmp1]vflip[out1];sine=d=20,asetnsamples=1000[out2]" \ -flags +bitexact -fflags +bitexact -sws_flags +accurate_rnd+bitexact \ -codec:v libx264 -codec:a mp2 -b:a 32k -pix_fmt yuv420p \ -map '0:v:0' \ -map '0:v:1' \ -map '0:a:0' \ -muxrate 800000 \ -program st=0:st=2 -program st=1:st=2 -program st=2 -program st=0 -f mpegts out1.ts Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/dashdec: start from the root uri when baseURL is start with '/'Steven Liu2019-09-02
| | | | | | fix ticket: 8097 Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* lavf/hlsenc: refine the get_relative_url function to avoid extra malloc for ↵Limin Wang2019-09-02
| | | | | | | relation path Reviewed-by: Steven Liu <lq@chinaffmpeg.org> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/utils: return pending IO error on EOF in av_read_frame()Marton Balint2019-08-31
| | | | | | | | | | | | | | | | | | | | | | | | | avio_feof() returns true both in case of actual EOF and in case of IO errors. Some demuxers (matroska) have special handling to be able to return the proper error for this exact reason, e.g.: if (avio_feof(pb)) { if (pb->error) { return pb->error; } else { return AVERROR_EOF; } } However, most of the demuxers do not, and they simply return AVERROR_EOF if avio_feof() is true, so there is a real chance that IO errors are mistaken for EOF. We might just say that the API user should always check the IO context error attribute on EOF to make sure no IO errors happened, but not even ffmpeg.c does this. It should be more intuitive to the API user if we simply return the IO error as the return value of av_read_frame() instead of AVERROR_EOF. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/avidec: add support for recognizing HEVC fourcc when demuxingMarton Balint2019-08-31
| | | | | | | | | | | Some security cams generate this, as well as some versions of VirtualDub and VLC so support for _reading_ such files is justified. Fixes ticket #7110. See also this discussion: https://patchwork.ffmpeg.org/patch/8744/ Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegts: fix teletext PTS when selecting teletext streams onlyMarton Balint2019-08-31
| | | | | | | | | | | | | | | After a1b4f120c031e6697bac9fd8c725d9c37ee36d13 the teletext PTS values were set to AV_NOPTS_VALUE if the stream of the PCR pid was discarded. What actually matters is that if we parse the PCR of the PCR PID or not, so let's use the cached discard value of the actual PCR PID instead of the stream discard value, which may be different. Also fixes ticket #7567, which was caused by the fact that teletext PTS values were not touched if the PCR pid was discarded even before a1b4f120c031e6697bac9fd8c725d9c37ee36d13. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec: add IMM5 decoderPaul B Mahol2019-08-29
|
* avformat/mpsubdec: Remove floating point usageMichael Niedermayer2019-08-29
| | | | | | | | | | | This makes the code bitexact between platforms. Intermediate timestamps between frames are preserved. The timebase is simplified. Rounding differs from doubles in cases where timestamps/durations are "funny" Suggested-by: jb Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/dump: dump the vbv_delay with N/A instead of 18446744073709551615Limin Wang2019-08-28
| | | | | | | | | | | | | | | | How to check it: ./ffmpeg -f lavfi -i testsrc -c:v mpeg2video -f null - master: Side data: cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: 18446744073709551615 patch applied: Side data: cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/dsfdec: set packet pts/duration/pos correctlyPaul B Mahol2019-08-28
|
* avformat/mov: improve timecode calculationPaul B Mahol2019-08-28
| | | | | Fixes timecode calculation for NTSC frame rates. Fixes ticket #5978.
* avformat/dhav: always initializer retPaul B Mahol2019-08-28
|
* avformat/hlsenc: remove unused valueSteven Liu2019-08-26
| | | | | CID: 1452644 Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/hlsenc: fix memleak of filenameSteven Liu2019-08-26
| | | | | CID: 1452445 Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/hlsenc: fix memleak in hls_write_trailerSteven Liu2019-08-26
| | | | | | fix CID: 1426931 Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/movenc: add muxing support for Dolby TrueHD streamsJames Almer2019-08-24
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: add demuxing support for Dolby TrueHD streamsJames Almer2019-08-24
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dhav: handle files missing data at startPaul B Mahol2019-08-24
| | | | | Try to seek to end of file and if signature is found seek backwards until last valid chunk is found.
* avformat/dhav: gracefully handle corrupted filesPaul B Mahol2019-08-24
| | | | Try to find next valid chunk in offsets of 0x8000 from last good one.
* avformat/mpegtsenc: get rid of packet counting for sdt/pat/pmtMarton Balint2019-08-23
| | | | | | | | | | | | | The packet counting based approach caused excessive sdt/pat/pmt for VBR, so let's use a timestamp based approach instead similar to how we emit PCRs. SDT/PAT/PMT period should be consistent for both VBR and CBR from now on. Also change the type of sdt_period and pat_period to AV_OPT_TYPE_DURATION so no floating point math is necessary. Fixes ticket #3714. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegtsenc: move some code around and simplify a bitMarton Balint2019-08-23
| | | | | | | PCR does not need to be recalcualted for CBR when inserting a NULL or PCR only packet. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegtsenc: add support for setting PCR interval for VBR streamsMarton Balint2019-08-23
| | | | | | | | Also document the algorithm for the default PCR interval. Fixes ticket #8061. Signed-off-by: Marton Balint <cus@passwd.hu>