[vlc-devel] [PATCH 0/3] Es it out, or Es it in?

Filip Roséen filip at videolabs.io
Wed Jul 13 22:41:51 CEST 2016


This patch-batch fixes issues related to the information associated
with a certain ES that was either not added properly, or remained in
place even if the ES was is no longer part of the played media.

The issue is /easily/ reproduced by:

    - opening media containing more than one program
    - switching between programs while playing a media
    - playing an mkv with linked segments.


Showing the issue
-----------------

An easy way to reproduce the issues is to play an mkv that is linked between
different files, where the ES (for whatever reason) cannot be reused when going
from one to the other.

In the following session, an mkv is played where the opening segment
has a duration of 60s. When playback is started we list the
stream-information (notice that there are 3 streams currently in
flight).

We then seek to 256s (2^8 is beautiful), and again look at the stream
information; now we see that we have 5 streams in flight (because the
demuxer decided to reuse the video ES).

If we seek back to 0, we have information that belongs to a total of 7
ES (where 4 of them are obsolete).

    -----------------------------------------------------------------
    NOTE: each of the two segments used in the example has 3 ES each.
    -----------------------------------------------------------------

-----------------------------------------------------
:: example session ( "!>" denotes input from user )
:: 
:: !>  % ./vlc-trunk MKV_anime_files/\[BSS\]_kurenai_-_06_\[1280x720_h264\]\[0356526F\].mkv -Irc 
:: !>  > info    
::     +----[ Stream 0 ]
::     |
::     | Decoded format: Planar 4:2:0 YUV
::     | Orientation: Top left
::     | Language: Japanese
::     | Codec: H264 - MPEG-4 AVC (part 10) (avc1)
::     | Chroma location: Left
::     | Frame rate: 23.976216
::     | Type: Video
::     | Display resolution: 1280x720
::     | Buffer dimensions: 1280x738
::     |
::     +----[ Stream 1 ]
::     |
::     | Codec: Vorbis Audio (vorb)
::     | Sample rate: 48000 Hz
::     | Bits per sample: 32
::     | Bitrate: 160 kb/s
::     | Type: Audio
::     | Channels: Stereo
::     | Language: Japanese
::     |
::     +----[ Stream 2 ]
::     |
::     | Description: Styled Subtitles
::     | Type: Subtitle
::     | Codec: SubStation Alpha subtitles (ssa )
::     | Language: English
::     |
::     +----[ end of stream info ]
:: !>  > seek 256
:: !>  > info
::     +----[ Stream 3 ]
::     |
::     | Codec: Vorbis Audio (vorb)
::     | Sample rate: 48000 Hz
::     | Bits per sample: 32
::     | Bitrate: 159 kb/s
::     | Type: Audio
::     | Channels: Stereo
::     | Language: Japanese
::     |
::     +----[ Stream 2 ]
::     |
::     | Description: Styled Subtitles
::     | Type: Subtitle
::     | Codec: SubStation Alpha subtitles (ssa )
::     | Language: English
::     |
::     +----[ Stream 0 ]
::     |
::     | Decoded format: Planar 4:2:0 YUV
::     | Orientation: Top left
::     | Language: Japanese
::     | Codec: H264 - MPEG-4 AVC (part 10) (avc1)
::     | Chroma location: Left
::     | Frame rate: 23.976216
::     | Type: Video
::     | Display resolution: 1280x720
::     | Buffer dimensions: 1280x738
::     |
::     +----[ Stream 1 ]
::     |
::     | Codec: Vorbis Audio (vorb)
::     | Sample rate: 48000 Hz
::     | Bits per sample: 32
::     | Bitrate: 160 kb/s
::     | Type: Audio
::     | Channels: Stereo
::     | Language: Japanese
::     |
::     +----[ Stream 4 ]
::     |
::     | Description: Styled Subtitles
::     | Type: Subtitle
::     | Codec: SubStation Alpha subtitles (ssa )
::     | Language: English
::     |
::     +----[ end of stream info ]
:: !>  > seek 0
:: !>  > info
::     +----[ Stream 3 ] <refp: output snipped />
::     +----[ Stream 5 ] <refp: output snipped />
::     +----[ Stream 2 ] <refp: output snipped />
::     +----[ Stream 6 ] <refp: output snipped />
::     +----[ Stream 0 ] <refp: output snipped />
::     +----[ Stream 1 ] <refp: output snipped />
::     +----[ Stream 4 ] <refp: output snipped />
::     |
::     +----[ end of stream info ]


Filip Roséen (3):
  input/es_out: added function EsOutDeleteInfo
  input/es_out: added function EsOutInfoCategoryName
  input/es_out: properly update/delete information

 src/input/es_out.c | 62 +++++++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 50 insertions(+), 12 deletions(-)

-- 
2.9.0



More information about the vlc-devel mailing list