Skip to content
Snippets Groups Projects
  1. Sep 12, 2022
    • Alexandre Janniaux's avatar
      input: decoder: extract substream handling · 2a4d648e
      Alexandre Janniaux authored and Steve Lhomme's avatar Steve Lhomme committed
      The substream handling was under a lot of precondition, leading to a lot
      of indentation. Moving this handling into a separate function allows
      early return within the function, which reduce to a single indentation
      level and greatly simplify the reading of the function while simplifying
      the caller site where it was only a specific case to handle.
      2a4d648e
    • Alexandre Janniaux's avatar
      vlc_frame: add vlc_fifo_Held/Assert · 322ea200
      Alexandre Janniaux authored and Steve Lhomme's avatar Steve Lhomme committed
      vlc_fifo_t are coming with their own lock which is exposed on the public
      interface, so provide sanitization state check functions like those
      available for vlc_mutex_t.
      322ea200
    • Alexandre Janniaux's avatar
      test: input_decoder: add CC tests · 2e41d0c6
      Alexandre Janniaux authored and Steve Lhomme's avatar Steve Lhomme committed
      The test is reliably failing with thread sanitizer enabled, without the
      previous patches:
      
          ==================
          WARNING: ThreadSanitizer: data race (pid=242170)
            Write of size 8 at 0x7b6c00010088 by thread T10:
              #0 DecoderPlayCc ../../src/input/decoder.c:1008 (libvlccore.so.9+0xebbf5)
              #1 ModuleThread_QueueCc ../../src/input/decoder.c:1064 (libvlccore.so.9+0xec031)
              #2 decoder_QueueCc ../../include/vlc_codec.h:444 (test_src_input_decoder+0x5768)
              #3 decoder_decode_check_cc ../../test/src/input/decoder/input_decoder_scenarios.c:79 (test_src_input_decoder+0x5a4e)
              #4 DecoderDecode ../../test/src/input/decoder/input_decoder.c:90 (test_src_input_decoder+0x3dd4)
              #5 DecoderThread_DecodeBlock ../../src/input/decoder.c:1376 (libvlccore.so.9+0xed9f1)
              #6 DecoderThread_ProcessInput ../../src/input/decoder.c:1498 (libvlccore.so.9+0xee14a)
              #7 DecoderThread ../../src/input/decoder.c:1786 (libvlccore.so.9+0xef877)
      
            Previous read of size 1 at 0x7b6c00010088 by thread T8:
              #0 vlc_input_decoder_HasCCChanFlag ../../src/input/decoder.c:2445 (libvlccore.so.9+0xf2a2b)
              #1 vlc_input_decoder_SetCcState ../../src/input/decoder.c:2464 (libvlccore.so.9+0xf2b5f)
              #2 EsOutSelectEs ../../src/input/es_out.c:2446 (libvlccore.so.9+0x1095c4)
              #3 EsOutSelect ../../src/input/es_out.c:2686 (libvlccore.so.9+0x10a7fc)
              #4 EsOutVaControlLocked ../../src/input/es_out.c:3270 (libvlccore.so.9+0x10dea5)
              #5 EsOutControlLocked ../../src/input/es_out.c:3147 (libvlccore.so.9+0x10d0ae)
              #6 EsOutVaPrivControlLocked ../../src/input/es_out.c:3759 (libvlccore.so.9+0x112282)
              #7 EsOutPrivControl ../../src/input/es_out.c:4028 (libvlccore.so.9+0x11505c)
              #8 es_out_vaPrivControl ../../src/input/es_out.h:105 (libvlccore.so.9+0x125a49)
              #9 es_out_PrivControl ../../src/input/es_out.h:112 (libvlccore.so.9+0x125b38)
              #10 es_out_SetEs ../../src/input/es_out.h:124 (libvlccore.so.9+0x125c4b)
              #11 Control ../../src/input/input.c:2123 (libvlccore.so.9+0x130e15)
              #12 MainLoop ../../src/input/input.c:724 (libvlccore.so.9+0x129676)
              #13 Run ../../src/input/input.c:428 (libvlccore.so.9+0x127faa)
      2e41d0c6
    • Alexandre Janniaux's avatar
      input: decoder: fix locking CC · 8f7b3838
      Alexandre Janniaux authored and Steve Lhomme's avatar Steve Lhomme committed
      vlc_input_decoder_HasCCChanFlag also needs to be protected, and the
      owner->lock mutex will be removed in later patches, to be completely
      replaced by the already existing fifo lock.
      
      The new cc.lock allows better thread safety without risking a deadlock
      between the super-decoder and the sub-decoder, by protecting the very
      state being synced by both of them.
      8f7b3838
    • Alexandre Janniaux's avatar
      input: decoder: add cc.lock for sub-decoders · ac7f9ce2
      Alexandre Janniaux authored and Steve Lhomme's avatar Steve Lhomme committed
      
      Sub-decoders are decoders whose state is defined by previous decoders.
      Specifically in the current case, picture frames with specific SEI data
      can convey subtitles as closed captions and report them from the decoder
      implementation itself.
      
      Since the core never locks the implementation, and the implementation
      can be asynchronously reporting subtitles, a common lock need to be
      setup so that the core can then check and use the sub-decoders being
      created without racing against the upper decoder implementation.
      
      Co-authored-by: default avatarFrançois Cartegnie <fcvlcdev@free.fr>
      ac7f9ce2
    • Alexandre Janniaux's avatar
      input: decoder: use vlc_input_decoder_Flush for CC · 3dd0f548
      Alexandre Janniaux authored and Steve Lhomme's avatar Steve Lhomme committed
      Separate the early return to make it clear that what follows require a
      valid closed-caption decoder.
      
      Then, use vlc_input_decoder_Flush directly, because pf_flush must be
      called from the CC decoder thread, and the fifo must be flushed
      beforehand, instead of calling it directly.
      3dd0f548
    • Alexandre Janniaux's avatar
      test: add vlc_input_decoder test · a6c3e3c6
      Alexandre Janniaux authored and Steve Lhomme's avatar Steve Lhomme committed
      The test provides an infrastructure based on previous transcode tests
      and video output tests, that will serve as basis for other
      input_decoder.c tests.
      a6c3e3c6
    • Johannes Kauffmann's avatar
      contrib: qt: fix string comparison · ec672174
      Johannes Kauffmann authored and Steve Lhomme's avatar Steve Lhomme committed
      -eq is for comparing integers and prints errors like:
      
      install_wrapper.sh: 27: [: Illegal number: imageformats
      ec672174
  2. Sep 10, 2022
  3. Sep 09, 2022
Loading