[FFmpeg-trac] #5250(ffserver:new): ffserver streaming broken in 3.0/master but worked in 2.8.6

FFmpeg trac at avcodec.org
Fri Feb 19 23:44:25 CET 2016


#5250: ffserver streaming broken in 3.0/master but worked in 2.8.6
------------------------------------+------------------------------------
             Reporter:  oviano      |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  important   |                Component:  ffserver
              Version:  git-master  |               Resolution:
             Keywords:  regression  |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by oviano):

 Ok, I found the culprits after a very tedious git bisect process (building
 on an Intel NUC doesn't help!). It's these two commits:

 e33d3720239314d28a48c64c1071ba9c048280d1
 3444c00aab6e187360a5aa66216abeb15d26ddc6

 First problem:

 Two of the strings passed into av_opt_set_int do not match:

 av_opt_set_int(s, "server_attached", 1, AV_OPT_SEARCH_CHILDREN);
 av_opt_set_int(s, "write_index", pos, AV_OPT_SEARCH_CHILDREN);
 av_opt_set_int(s, "file_size", file_size, AV_OPT_SEARCH_CHILDREN);

 ...should be...

 av_opt_set_int(s, "server_attached", 1, AV_OPT_SEARCH_CHILDREN);
 av_opt_set_int(s, "ffm_write_index", pos, AV_OPT_SEARCH_CHILDREN);
 av_opt_set_int(s, "ffm_file_size", file_size, AV_OPT_SEARCH_CHILDREN);

 (Isn't this a bit of a fragile way to go about things, relying on string
 matching with no error checking for a mismatch?)

 Second problem:

 When these fields are defined they have an invalid range:

 static const AVOption options[] = {
     {"server_attached", NULL, offsetof(FFMContext, server_attached),
 AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AV_OPT_FLAG_EXPORT },
     {"ffm_write_index", NULL, offsetof(FFMContext, write_index),
 AV_OPT_TYPE_INT64, {.i64 = 0}, 0, 1, AV_OPT_FLAG_EXPORT },
     {"ffm_file_size", NULL, offsetof(FFMContext, file_size),
 AV_OPT_TYPE_INT64, {.i64 = 0}, 0, 1, AV_OPT_FLAG_EXPORT },
     { NULL },
 };

 ...should be...

 static const AVOption options[] = {
     {"server_attached", NULL, offsetof(FFMContext, server_attached),
 AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AV_OPT_FLAG_EXPORT },
     {"ffm_write_index", NULL, offsetof(FFMContext, write_index),
 AV_OPT_TYPE_INT64, {.i64 = 0}, 0, INT64_MAX, AV_OPT_FLAG_EXPORT },
     {"ffm_file_size", NULL, offsetof(FFMContext, file_size),
 AV_OPT_TYPE_INT64, {.i64 = 0}, 0, INT64_MAX, AV_OPT_FLAG_EXPORT },
     { NULL },
 };

 (Actually, I don't know what the accepted range is?)

 If I make these changes then I can stream again using latest code.

 Well I've learned a little "git" over the past two days, if someone can
 advise me on a suitable range for the two fields above then I am happy to
 learn "patch" and post it to the developers mailing list.

 Or someone else can do it, I don't mind...

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5250#comment:9>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list