summaryrefslogtreecommitdiffstats
path: root/ffserver.c
Commit message (Collapse)AuthorAgeFilesLines
* ffserver: fixed deallocation bug in build_feed_streamsGregor Riepl2016-05-271-0/+2
| | | | | Signed-off-by: Gregor Riepl <onitake@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | ffserver: Fixed ffserver to support large ffm filesLior Mualem2016-03-081-4/+5
| | | | | | | | | | | | ffm_read_write_index returns a 64bit value, Github: Closes #185
* | ffserver&ffm: Fixed issues preventing ffserver write_index and files_size ↵Oliver Collyer2016-02-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | from being set correctly which was breaking ffserver streaming. I discovered that ffserver streaming was broken (it seems like it has been since 20th November) and I opened a ticket for this (https://trac.ffmpeg.org/ticket/5250 <https://trac.ffmpeg.org/ticket/5250>). I spent yesterday learning git bisect (with the kind help of cehoyos) to painstakingly track down the cause. This was made more difficult due to the presence of a segfault in ffserver during the period where the bug was introduced so I first had to identify when and how that was fixed and then retrospectively apply that fix again for each step of the second git bisect to find the actual bug. Anyway, the fruits of my labour are the innocent looking patch below to correct a couple of typos and define a valid range for two variables. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffserver: Cast time_t value when using it in a format string.Carl Eugen Hoyos2015-12-291-1/+1
| | | | | | | | Fixes ticket #5103.
* | ffserver: add a doctype heading to our HTML pagesReynaldo H. Verdejo Pinochet2015-12-271-0/+4
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: HTML encode msgs instead of blindly stripping chars outReynaldo H. Verdejo Pinochet2015-12-271-8/+81
| | | | | | | | | | | | | | | | | | Fixes weirdness like our "??filename? not found" 404. None of the chars being used from the previously blacklisted list needs to be scaped on an UTF-8 document context Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: make our 404 explicitly HTML5/UTF-8Reynaldo H. Verdejo Pinochet2015-12-271-1/+5
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: refactor build_feed_streams()Reynaldo H. Verdejo Pinochet2015-12-191-74/+98
| | | | | | | | | | | | | | | | | | | | * Avoid excesive nesting that made it really hard to follow * Drop unneeded vars * Factor out codec compatibility check routine * Ensure inputs are closed and contexts are freed as needed before returning Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: refactor build_file_streams()Reynaldo H. Verdejo Pinochet2015-12-191-41/+44
| | | | | | | | | | | | Avoid unneeded nesting, drop redundant var Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: unify exit path from build_feed_streams()Reynaldo H. Verdejo Pinochet2015-12-191-17/+29
| | | | | | | | | | | | | | Exit from main on build_feed_streams() failures & use standard EXIT_ codes on error out/normal exit. Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: explicitly use time_t for uptime calcReynaldo H. Verdejo Pinochet2015-12-151-2/+4
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: free pathname before bailing outReynaldo H. Verdejo Pinochet2015-12-151-0/+1
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: use EXIT_FAILURE on failed child fork()Reynaldo H. Verdejo Pinochet2015-12-151-1/+1
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: be explicit on failed fork() msgReynaldo H. Verdejo Pinochet2015-12-151-1/+1
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: allocate AVStream's internal tooReynaldo H. Verdejo Pinochet2015-12-151-0/+2
| | | | | | | | | | | | | | | | | | | | Avoids segfault at init_muxer() (mux.c) due to a null pointer dereference on the recently introduced AVStream->internal Fixes: #5059 (https://trac.ffmpeg.org/ticket/5059) Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: Clear avio context after closing it in rtp_new_av_stream()Michael Niedermayer2015-11-301-0/+1
| | | | | | | | | | Suggested-by: "Reynaldo H. Verdejo Pinochet" <reynaldo@osg.samsung.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffserver: Clear avio context after closing itMichael Niedermayer2015-11-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: ==13287== Invalid read of size 4 ==13287== at 0x45161A: flush_buffer (aviobuf.c:143) ==13287== by 0x451971: avio_flush (aviobuf.c:200) ==13287== by 0x512CCF: av_write_trailer (mux.c:1016) ==13287== by 0x41A5E0: close_connection (ffserver.c:853) ==13287== by 0x421EDC: rtsp_cmd_interrupt (ffserver.c:3245) ==13287== by 0x420B9C: rtsp_parse_request (ffserver.c:2854) ==13287== by 0x41A9C2: handle_connection (ffserver.c:930) ==13287== by 0x41A04B: http_server (ffserver.c:700) ==13287== by 0x423A60: main (ffserver.c:3897) ==13287== Address 0xb6cd258 is 88 bytes inside a block of size 192 free'd ==13287== at 0x4C2B5D9: free (vg_replace_malloc.c:446) ==13287== by 0x1004DAC: av_free (mem.c:239) ==13287== by 0x454835: avio_close_dyn_buf (aviobuf.c:1170) ==13287== by 0x41F385: http_prepare_data (ffserver.c:2368) ==13287== by 0x41F59B: http_send_data (ffserver.c:2416) ==13287== by 0x41ABE2: handle_connection (ffserver.c:986) ==13287== by 0x41A04B: http_server (ffserver.c:700) ==13287== by 0x423A60: main (ffserver.c:3897) Reviewed-by: "Reynaldo H. Verdejo Pinochet" <reynaldo@osg.samsung.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffserver: add NULL context to ff_rtsp_parse_line().Nicolas George2015-11-291-1/+1
| | | | | | | | Needed after f62fe53/2c17fb6.
* | ffserver: Use AVOption API to access ffm demuxer instead of direct access ↵Michael Niedermayer2015-11-201-3/+3
| | | | | | | | | | | | | | | | | | depending on ABI server_attached is newly added so the demuxer knows if there is an attached server that can update the write index. This is needed to fix a infinite loop Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffserver: Replace one malloc(AVStream) by avformat_new_stream()Michael Niedermayer2015-11-111-6/+7
| | | | | | | | | | | | | | This fixes a null pointer dereference from the recently introduced AVStream->internal Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffserver: Do not add or rescale AV_NOPTS_VALUE from the demuxerMichael Niedermayer2015-11-111-3/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffserver: fix incorrect strlcpy usageGanesh Ajjanagadde2015-11-091-2/+6
| | | | | | | | | | | | | | | | | | | | | | Somewhat ironic that this "safe" interface is actually being used unsafely here. This fixes the usage preventing potential null pointer dereference, where the old code was doubly broken: ctime can return NULL, and ctime can return an arbitrarily long buffer. Reviewed-by: Mark Harris <mark.hsj@gmail.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | Replace remaining occurances of av_free_packet with av_packet_unrefHendrik Leppkes2015-10-271-4/+4
| |
* | ffserver: avoid leaking pathname at exitReynaldo H. Verdejo Pinochet2015-10-041-0/+1
| | | | | | | | | | | | Fixes Coverity CID 1325681 Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: fix up rate units in server messagesReynaldo H. Verdejo Pinochet2015-10-041-5/+5
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: wrap around bandwidth exceeded msg textReynaldo H. Verdejo Pinochet2015-10-041-3/+5
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: wrap around too-busy message textReynaldo H. Verdejo Pinochet2015-10-041-2/+4
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: unify exit path in _write_index()Reynaldo H. Verdejo Pinochet2015-10-041-2/+6
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: explicitly free() duped filenameReynaldo H. Verdejo Pinochet2015-09-181-0/+1
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: start dropping all unneededly harcoded str lengthsReynaldo H. Verdejo Pinochet2015-09-181-2/+22
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | lavc: Switch bitrate to 64bit unless compatibility with avconv was requested.Michael Niedermayer2015-09-151-2/+2
| |
* | ffserver: remove redundant comment, clarify another oneReynaldo H. Verdejo Pinochet2015-09-111-2/+1
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: unify exit path in http_server()Reynaldo H. Verdejo Pinochet2015-09-111-10/+9
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: unify fail path in socket_open_listen()Reynaldo H. Verdejo Pinochet2015-09-111-4/+6
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: cast PID to int64_t before printingGanesh Ajjanagadde2015-08-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately, there is no portable format specifier for PID's. Furthermore, it is not safe to assume pid_t <= 32 bit in size, see e.g http://unix.derkeiler.com/Mailing-Lists/AIX-L/2010-08/msg00008.html. Right now, it is ok to assume pid_t <= 32 bit in size, but this may change in the future. Also, this patch fixes warning due to lack of an appropriate cast from http://fate.ffmpeg.org/report.cgi?time=20150820233505&slot=x86-opensolaris-gcc4.3. Note that this method of handling pid_t is in line with what nginx does. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-271-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* | ffserver: add (), fix order of operationsMichael Niedermayer2015-07-271-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffserver: drop superfluous else clauseReynaldo H. Verdejo Pinochet2015-07-261-2/+1
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: simplify assignment with ternaryReynaldo H. Verdejo Pinochet2015-07-261-7/+3
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: move decl to start of funcReynaldo H. Verdejo Pinochet2015-07-261-1/+1
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: make statement block unconditional by exiting earlyReynaldo H. Verdejo Pinochet2015-06-241-11/+11
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: make statement block unconditional by exiting earlyReynaldo H. Verdejo Pinochet2015-06-241-10/+11
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: unify comment formating & drop unneeded bracesReynaldo H. Verdejo Pinochet2015-06-241-54/+60
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: factor out stream params printingReynaldo H. Verdejo Pinochet2015-06-241-36/+48
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: simplify URLContext cleanupReynaldo H. Verdejo Pinochet2015-06-241-4/+1
| | | | | | | | | | | | | | Drop unneeded var and avoid checking for NULL twice as ffurl_closep() already does this. Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: drop unneeded else branchingReynaldo H. Verdejo Pinochet2015-06-211-1/+2
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: drop unneeded else branchingReynaldo H. Verdejo Pinochet2015-06-211-7/+6
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: drop unneeded else branchingReynaldo H. Verdejo Pinochet2015-06-211-5/+4
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* | ffserver: formatingReynaldo H. Verdejo Pinochet2015-06-211-5/+4
| | | | | | | | Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
OpenPOWER on IntegriCloud