qtdemux: Specify REDIRECT information in error message
authorThibault Saunier <tsaunier@igalia.com>
Tue, 3 Sep 2019 20:46:30 +0000 (16:46 -0400)
committerThibault Saunier <tsaunier@igalia.com>
Mon, 30 Sep 2019 15:15:43 +0000 (12:15 -0300)
commita55576d1fd25c7d67661630fc94367908802a496
treef1ad947a76d864accf77be4ae8b9d1f6e7f07e7e
parenta24596423a6201c91bface3b3ff2133587dd8bf9
qtdemux: Specify REDIRECT information in error message

There are in the wild (mp4) streams that basically contain no tracks
but do have a redirect info[0], in which case, we won't be able
to expose any pad (there are no tracks) so we can't post anything but
an error on the bus, as:

- it can't send EOS downstream, it has no pad,
- posting an EOS message will be useless as PAUSED state can't be
  reached and there is no sink in the pipeline meaning GstBin will
  simply ignore it

The approach here is to to add details to the ERROR message with a
`redirect-location` field which elements like playbin handle and use right
away.

[0]: http://movietrailers.apple.com/movies/paramount/terminator-dark-fate/terminator-dark-fate-trailer-2_480p.mov
gst/isomp4/qtdemux.c
gst/isomp4/qtdemux.h