diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2016-06-15 15:24:30 -0400 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2016-06-17 11:38:33 -0400 |
commit | 76729970049fe95659346503f7401a5d869f9959 (patch) | |
tree | bb83104f83e15a06cddf287e00f0320af3548074 /libavformat/isom.h | |
parent | 187d719760bd130f848194ec4a6bd476341914bb (diff) | |
download | ffmpeg-76729970049fe95659346503f7401a5d869f9959.tar.gz |
mov: Implement support for multiple sample description tables
Store data from each stsd in a separate extradata buffer, keep track of
the stsc index for read and seek operations, switch buffers when the
index differs. Decoder is notified with an AV_PKT_DATA_NEW_EXTRADATA
packet side data.
Since H264 supports this notification, and can be reset midstream, enable
this feature only for multiple avcC's. All other stsd types (such as
hvc1 and hev1) need decoder-side changes, so they are left disabled for
now.
This is implemented only in non-fragmented MOVs.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavformat/isom.h')
-rw-r--r-- | libavformat/isom.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/isom.h b/libavformat/isom.h index aec623b95c..75aa70bccc 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -105,6 +105,8 @@ typedef struct MOVStreamContext { MOVStts *ctts_data; unsigned int stsc_count; MOVStsc *stsc_data; + int stsc_index; + int stsc_sample; unsigned int stps_count; unsigned *stps_data; ///< partial sync sample for mpeg-2 open gop int ctts_index; @@ -137,6 +139,12 @@ typedef struct MOVStreamContext { unsigned int rap_group_count; MOVSbgp *rap_group; + /** extradata array (and size) for multiple stsd */ + uint8_t **extradata; + int *extradata_size; + int last_stsd_index; + int stsd_count; + int32_t *display_matrix; } MOVStreamContext; |