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.
Unified · Split
| @@ -15,6 +15,9 @@ libavutil: 2017-10-21 · 14 unmodified lines | ||
| 15 | 15 | |
| 16 | 16 | API changes, most recent first: |
| 17 | 17 | |
| 18 | +2018-05-xx - xxxxxxxxxx - lavf 58.14.100 - avformat.h | |
| 19 | + Add AV_DISPOSITION_STILL_IMAGE | |
| 20 | + | |
| 18 | 21 | 2018-05-xx - xxxxxxxxxx - lavu 56.18.101 - hwcontext_cuda.h |
| 19 | 22 | Add AVCUDADeviceContext.stream. |
| 20 | 23 | |
| @@ -846,6 +846,7 @@ typedef struct AVStreamInternal AVStreamInternal; · 845 unmodified lines | ||
| 846 | 846 | #define AV_DISPOSITION_DESCRIPTIONS 0x20000 |
| 847 | 847 | #define AV_DISPOSITION_METADATA 0x40000 |
| 848 | 848 | #define AV_DISPOSITION_DEPENDENT 0x80000 ///< dependent audio stream (mix_type=0 in mpegts) |
| 849 | +#define AV_DISPOSITION_STILL_IMAGE 0x100000 ///< still images in video stream (still_picture_flag=1 in mpegts) | |
| 849 | 850 | |
| 850 | 851 | /** |
| 851 | 852 | * Options for behavior on timestamp wrap detection. |
| @@ -551,6 +551,8 @@ static void dump_stream_format(AVFormatContext *ic, int i, · 550 unmodified lines | ||
| 551 | 551 | av_log(NULL, AV_LOG_INFO, " (descriptions)"); |
| 552 | 552 | if (st->disposition & AV_DISPOSITION_DEPENDENT) |
| 553 | 553 | av_log(NULL, AV_LOG_INFO, " (dependent)"); |
| 554 | + if (st->disposition & AV_DISPOSITION_STILL_IMAGE) | |
| 555 | + av_log(NULL, AV_LOG_INFO, " (still image)"); | |
| 554 | 556 | av_log(NULL, AV_LOG_INFO, "\n"); |
| 555 | 557 | |
| 556 | 558 | dump_metadata(NULL, st->metadata, " "); |
| @@ -1683,6 +1683,11 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type · 1682 unmodified lines | ||
| 1683 | 1683 | mpegts_find_stream_type(st, desc_tag, DESC_types); |
| 1684 | 1684 | |
| 1685 | 1685 | switch (desc_tag) { |
| 1686 | + case 0x02: /* video stream descriptor */ | |
| 1687 | + if (get8(pp, desc_end) & 0x1) { | |
| 1688 | + st->disposition |= AV_DISPOSITION_STILL_IMAGE; | |
| 1689 | + } | |
| 1690 | + break; | |
| 1686 | 1691 | case 0x1E: /* SL descriptor */ |
| 1687 | 1692 | desc_es_id = get16(pp, desc_end); |
| 1688 | 1693 | if (desc_es_id < 0) |
| @@ -32,8 +32,8 @@ · 31 unmodified lines | ||
| 32 | 32 | // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) |
| 33 | 33 | // Also please add any ticket numbers that you believe might be affected here |
| 34 | 34 | #define LIBAVFORMAT_VERSION_MAJOR 58 |
| 35 | −#define LIBAVFORMAT_VERSION_MINOR 13 | |
| 36 | −#define LIBAVFORMAT_VERSION_MICRO 102 | |
| 35 | +#define LIBAVFORMAT_VERSION_MINOR 14 | |
| 36 | +#define LIBAVFORMAT_VERSION_MICRO 100 | |
| 37 | 37 | |
| 38 | 38 | #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ |
| 39 | 39 | LIBAVFORMAT_VERSION_MINOR, \ |