avformat/mpegts: tag video streams with still images

Parses the video_stream_descriptor (H.222 2.6.2) to look
for the still_picture_flag. This is exposed to the user
via a new AV_DISPOSITION_STILL_IMAGE.

See for example https://tmm1.s3.amazonaws.com/music-choice.ts,
whose video stream only updates every ~6 seconds.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Aman Gupta
2018-05-15 11:26:07 -07:00
parent 2734f8d63a
commit 5dfeb7f081
5 changed files with 13 additions and 2 deletions

View File

@@ -1683,6 +1683,11 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
mpegts_find_stream_type(st, desc_tag, DESC_types);
switch (desc_tag) {
case 0x02: /* video stream descriptor */
if (get8(pp, desc_end) & 0x1) {
st->disposition |= AV_DISPOSITION_STILL_IMAGE;
}
break;
case 0x1E: /* SL descriptor */
desc_es_id = get16(pp, desc_end);
if (desc_es_id < 0)