Skip to content
Snippets Groups Projects
  1. Oct 01, 2019
    • Thomas Guillem's avatar
      po: add amt.c · 9a9cb365
      Thomas Guillem authored
      9a9cb365
    • Natalie Landsberg's avatar
      access: add AMT multicast tunneling module · 51b38743
      Natalie Landsberg authored and Thomas Guillem's avatar Thomas Guillem committed
      
      This commit adds support for AMT multicast tunneling over non-multicast enabled
      network.
      
      Signed-off-by: default avatarThomas Guillem <thomas@gllm.fr>
      51b38743
    • Thomas Guillem's avatar
      avcodec: use a mutex instead of sem · 3281dab0
      Thomas Guillem authored
      Using a mutex instead of a sem allows avcodec callbacks to not wait for a
      future pf_decode and pf_flush call.
      
      The semaphore was used because ffmpeg was not thread-safe in that time. Indeed,
      the additional goal of the semaphore was to prevent any concurrent avcodec
      call.
      
      The mutex protect the pts, the p_va, the dec->fmt_out variables, the
      decoder_UpdateVideoFormat() and the decoder_NewPicture() call. Indeed,
      decoder_UpdateVideoFormat() is not reentrant and the caller should take care
      about serialization.
      3281dab0
    • Thomas Guillem's avatar
      avcodec: fix data-races · b2e31462
      Thomas Guillem authored
      There was various data-races between any avcodec threads and the pf_decode
      thread. The scope of sem wait/post need to be increased. Indeed, dec->fmt_out,
      pts, p_va must be accessed while being protected, the same for
      lavc_UpdateVideoFormat() and decoder_NewPicture().
      
      PS: decoder_QueuePicture() and picture_Release() don't have to be protected,
      it's better to release the sempahore before calling it in order to unlock
      avcodec threads while the picture is being queued.
      
      WARNING: ThreadSanitizer: data race (pid=6962)
        Write of size 4 at 0x7b800002001c by thread T14 (mutexes: write M499, write M491):
          #0 date_Change ../../src/misc/mtime.c:83 (libvlccore.so.9+0xcec72)
          #1 lavc_UpdateVideoFormat ../../modules/codec/avcodec/video.c:357 (libavcodec_plugin.so+0xc50fa)
          #2 lavc_GetFrame ../../modules/codec/avcodec/video.c:1598 (libavcodec_plugin.so+0xc8d0e)
          #3 get_buffer_internal src/libavcodec/decode.c:1940 (libavcodec_plugin.so+0x12b4f2)
          #4 ff_get_buffer src/libavcodec/decode.c:1965 (libavcodec_plugin.so+0x12b4f2)
      
        Previous read of size 4 at 0x7b800002001c by thread T18:
          #0 date_Increment ../../src/misc/mtime.c:91 (libvlccore.so.9+0xceced)
          #1 interpolate_next_pts ../../modules/codec/avcodec/video.c:798 (libavcodec_plugin.so+0xc4856)
          #2 DecodeBlock ../../modules/codec/avcodec/video.c:1199 (libavcodec_plugin.so+0xc7f4e)
          #3 DecodeVideo ../../modules/codec/avcodec/video.c:1357 (libavcodec_plugin.so+0xc8996)
          #4 DecoderThread_DecodeBlock ../../src/input/decoder.c:1278 (libvlccore.so.9+0x5cac7)
          #5 DecoderThread_ProcessInput ../../src/input/decoder.c:1400 (libvlccore.so.9+0x5ca99)
          #6 DecoderThread ../../src/input/decoder.c:1676 (libvlccore.so.9+0x5cd69)
      
      WARNING: ThreadSanitizer: data race (pid=6962)
        Atomic write of size 8 at 0x7b4c0002fc70 by thread T18:
          #0 __tsan_atomic64_fetch_sub ../../../../src/libsanitizer/tsan/tsan_interface_atomic.cc:646 (libtsan.so.0+0x648dd)
          #1 picture_Release ../../include/vlc_picture.h:203 (libavcodec_plugin.so+0xc6aa8)
          #2 lavc_ReleaseFrame ../../modules/codec/avcodec/video.c:1461 (libavcodec_plugin.so+0xc6aa8)
          #3 buffer_replace src/libavutil/buffer.c:120 (libavcodec_plugin.so+0x999596)
          #4 av_buffer_unref src/libavutil/buffer.c:130 (libavcodec_plugin.so+0x999596)
          #5 DecoderThread_Flush ../../src/input/decoder.c:1420 (libvlccore.so.9+0x58c8e)
          #6 DecoderThread ../../src/input/decoder.c:1581 (libvlccore.so.9+0x5ce24)
      
        Previous write of size 8 at 0x7b4c0002fc70 by thread T12 (mutexes: write M494, write M491):
          #0 malloc ../../../../src/libsanitizer/tsan/tsan_interceptors.cc:606 (libtsan.so.0+0x2b1a3)
          #1 malloc ../../../../src/libsanitizer/tsan/tsan_interceptors.cc:601 (libtsan.so.0+0x2b1a3)
          #2 picture_NewPrivate ../../src/misc/picture.c:200 (libvlccore.so.9+0xd3239)
          #3 picture_NewFromResource ../../src/misc/picture.c:226 (libvlccore.so.9+0xd338c)
          #4 picture_pool_ClonePicture ../../src/misc/picture_pool.c:109 (libvlccore.so.9+0xd4ba2)
          #5 picture_pool_Wait ../../src/misc/picture_pool.c:271 (libvlccore.so.9+0xd5375)
          #6 vout_GetPicture ../../src/video_output/video_output.c:326 (libvlccore.so.9+0xa9c2f)
          #7 ModuleThread_NewVideoBuffer ../../src/input/decoder.c:605 (libvlccore.so.9+0x5af28)
          #8 decoder_NewPicture ../../src/input/decoder_helpers.c:93 (libvlccore.so.9+0x5f8b6)
          #9 lavc_dr_GetFrame ../../modules/codec/avcodec/video.c:1504 (libavcodec_plugin.so+0xc6b44)
          #10 lavc_GetFrame ../../modules/codec/avcodec/video.c:1611 (libavcodec_plugin.so+0xc8d47)
          #11 get_buffer_internal src/libavcodec/decode.c:1940 (libavcodec_plugin.so+0x12b4f2)
          #12 ff_get_buffer src/libavcodec/decode.c:1965 (libavcodec_plugin.so+0x12b4f2)
      
      WARNING: ThreadSanitizer: data race (pid=7336)
        Read of size 4 at 0x7b8000021020 by thread T13 (mutexes: write M444, write M438):
          #0 date_Change ../../src/misc/mtime.c:81 (libvlccore.so.9+0xcec41)
          #1 lavc_UpdateVideoFormat ../../modules/codec/avcodec/video.c:357 (libavcodec_plugin.so+0xc50fa)
          #2 lavc_GetFrame ../../modules/codec/avcodec/video.c:1598 (libavcodec_plugin.so+0xc8d0e)
          #3 get_buffer_internal src/libavcodec/decode.c:1940 (libavcodec_plugin.so+0x12b4f2)
          #4 ff_get_buffer src/libavcodec/decode.c:1965 (libavcodec_plugin.so+0x12b4f2)
      
        Previous write of size 4 at 0x7b8000021020 by thread T18:
          #0 date_Set ../../include/vlc_tick.h:260 (libavcodec_plugin.so+0xc7f38)
          #1 DecodeBlock ../../modules/codec/avcodec/video.c:1197 (libavcodec_plugin.so+0xc7f38)
          #2 DecodeVideo ../../modules/codec/avcodec/video.c:1357 (libavcodec_plugin.so+0xc8996)
          #3 DecoderThread_DecodeBlock ../../src/input/decoder.c:1278 (libvlccore.so.9+0x5cac7)
          #4 DecoderThread_ProcessInput ../../src/input/decoder.c:1400 (libvlccore.so.9+0x5ca99)
          #5 DecoderThread ../../src/input/decoder.c:1676 (libvlccore.so.9+0x5cd69)
      b2e31462
    • Thomas Guillem's avatar
      f25e2b13
  2. Sep 30, 2019
  3. Sep 27, 2019
  4. Sep 26, 2019
  5. Sep 25, 2019
  6. Sep 24, 2019
Loading