[FFmpeg-devel] [PATCH 0/4] FFserver configuration

Lukasz Marek lukasz.m.luki2 at gmail.com
Mon Oct 20 23:56:58 CEST 2014


Some time ago I wanted to setup internet camera streaming via ffserver
and I faced the same probalem as #1275.
It was over a year ago, so I don't remember correctly, but a conclusion
from debugging was that codec's private data are not initialized to their
defaults. As I remember I was cased by allocating it on stack and
calling avcodec_get_context_defaults3 without codec.

I reworked whole configuration parsing routine so I is allocated correctly now.

This patchset also make order of entries in <Stream> tag not relevant.
I think there is also a better error handling now (detecting wrong entry in a tag)
and probably easier to improve that more.

I know review will be a nightmare. Patches 1 & 3 are intended to be just a copy-paste,
but there some changes in them. In patch 1 I added FFserver prefixes to stuff moved into header.
In patch 3 I removed if(stream) etc checks.

Overall after these changes streaming is working, but ffplay stops playing after few seconds.
I noticed ffmpeg is working at 270fps which seems wrong. I guess this is different story anyway,
because this also happen without patches and workaround described in ticket.

Lukasz Marek (4):
  ffserver: move configuration code to separate file
  ffserver_config: clean up variable initialization
  ffserver_conf: factorize parse function per config tag
  ffserver_config: postpone codec context creation

 Makefile          |    1 +
 ffserver.c        | 1224 +++++------------------------------------------------
 ffserver_config.c | 1004 +++++++++++++++++++++++++++++++++++++++++++
 ffserver_config.h |  128 ++++++
 4 files changed, 1239 insertions(+), 1118 deletions(-)
 create mode 100644 ffserver_config.c
 create mode 100644 ffserver_config.h

-- 
1.9.1



More information about the ffmpeg-devel mailing list