[FFmpeg-devel] [PATCH] avformat/hlsenc: set default http method to PUT when method is null

Steven Liu lingjiujianke at gmail.com
Thu Feb 16 02:43:55 EET 2017


2017-02-16 4:19 GMT+08:00 Michael Niedermayer <michael at niedermayer.cc>:

> On Wed, Feb 15, 2017 at 11:45:49PM +0800, Steven Liu wrote:
> > When the http method is not set, the method will use POST for ts,
> > PUT for m3u8, it is not unify, now set it unify.
> > This ticket id: 5315
> >
> > Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
> > ---
> >  libavformat/hlsenc.c | 14 +++++++++++---
> >  1 file changed, 11 insertions(+), 3 deletions(-)
>
> this breaks fate-filter-hls-append
>
> heres a backtrace, sorry for the missing line numbers i can rebuild
> with debug stuff if you cannot reproduce
>
> ==19211== Process terminating with default action of signal 11 (SIGSEGV)
> ==19211==  Access not within mapped region at address 0x0
> ==19211==    at 0x4C2FC89: strspn (mc_replace_strmem.c:1491)
> ==19211==    by 0x62FAEC: url_find_protocol (in ffmpeg_g)
> ==19211==    by 0x630938: avio_find_protocol_name (in ffmpeg_g)
> ==19211==    by 0x664595: hls_window (in ffmpeg_g)
> ==19211==    by 0x666A20: hls_write_trailer (in ffmpeg_g)
> ==19211==    by 0x6C5BAC: av_write_trailer (in ffmpeg_g)
> ==19211==    by 0x4C3951: transcode (in ffmpeg_g)
> ==19211==    by 0x4A5257: main (in ffmpeg_g)
>

 localhost:test StevenLiu$ lldb -c /cores/core.83014 ./ffmpeg_g
(lldb) target create "./ffmpeg_g" --core "/cores/core.83014"
warning: (x86_64) /cores/core.83014 load command 94 LC_SEGMENT_64 has a
fileoff + filesize (0x2e918000) that extends beyond the end of the file
(0x2e917000), the segment will be truncated to match
warning: (x86_64) /cores/core.83014 load command 95 LC_SEGMENT_64 has a
fileoff (0x2e918000) that extends beyond the end of the file (0x2e917000),
ignoring this section
Core file '/cores/core.83014' (x86_64) was loaded.
(lldb) bt
* thread #1: tid = 0x0000, 0x00007fffa1c12f68 libsystem_c.dylib`strspn +
22, stop reason = signal SIGSTOP
  * frame #0: 0x00007fffa1c12f68 libsystem_c.dylib`strspn + 22
    frame #1: 0x00000001027fea23
ffmpeg_g`url_find_protocol(filename=0x0000000000000000) + 51 at avio.c:255
[opt]
    frame #2: 0x00000001027ff286
ffmpeg_g`avio_find_protocol_name(url=<unavailable>) + 6 at avio.c:475 [opt]
    frame #3: 0x0000000102837f54 ffmpeg_g`hls_window [inlined]
set_http_options(c=0x00007ff48181cc00) + 12 at hlsenc.c:669 [opt]
    frame #4: 0x0000000102837f48 ffmpeg_g`hls_window(s=0x00007ff48181c600,
last=<unavailable>) + 264 at hlsenc.c:720 [opt]
    frame #5: 0x00000001028368e2
ffmpeg_g`hls_write_trailer(s=0x00007ff48181c600) + 562 at hlsenc.c:1431
[opt]
    frame #6: 0x0000000102899736 ffmpeg_g`av_write_trailer(s=<unavailable>)
+ 278 at mux.c:1329 [opt]
    frame #7: 0x00000001026a4a8c ffmpeg_g`transcode + 19740 at
ffmpeg.c:4430 [opt]
    frame #8: 0x000000010269f5e1 ffmpeg_g`main(argc=<unavailable>,
argv=<unavailable>) + 337 at ffmpeg.c:4598 [opt]
    frame #9: 0x00007fffa1b81255 libdyld.dylib`start + 1
    frame #10: 0x00007fffa1b81255 libdyld.dylib`start + 1


I have reproduced and fixed it.

>
>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Complexity theory is the science of finding the exact solution to an
> approximation. Benchmarking OTOH is finding an approximation of the exact
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>


More information about the ffmpeg-devel mailing list