Merge commit '53ea595eec'
* commit '53ea595eec': mov: Rework stsc index validation Seee26e6240b6. Merged-by: James Almer <jamrial@gmail.com>
This commit is contained in:
commit
b35f6d3aa3
2 changed files with 7 additions and 4 deletions
|
|
@ -141,7 +141,7 @@ typedef struct MOVStreamContext {
|
|||
MOVStts *ctts_data;
|
||||
unsigned int stsc_count;
|
||||
MOVStsc *stsc_data;
|
||||
int stsc_index;
|
||||
unsigned int stsc_index;
|
||||
int stsc_sample;
|
||||
unsigned int stps_count;
|
||||
unsigned *stps_data; ///< partial sync sample for mpeg-2 open gop
|
||||
|
|
|
|||
|
|
@ -2447,10 +2447,13 @@ static int mov_read_stsc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#define mov_stsc_index_valid(index, count) ((index) < (count) - 1)
|
||||
static inline int mov_stsc_index_valid(unsigned int index, unsigned int count)
|
||||
{
|
||||
return index < count - 1;
|
||||
}
|
||||
|
||||
/* Compute the samples value for the stsc entry at the given index. */
|
||||
static inline int mov_get_stsc_samples(MOVStreamContext *sc, int index)
|
||||
static inline int mov_get_stsc_samples(MOVStreamContext *sc, unsigned int index)
|
||||
{
|
||||
int chunk_count;
|
||||
|
||||
|
|
@ -6647,7 +6650,7 @@ static int mov_seek_stream(AVFormatContext *s, AVStream *st, int64_t timestamp,
|
|||
{
|
||||
MOVStreamContext *sc = st->priv_data;
|
||||
int sample, time_sample;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
int ret = mov_seek_fragment(s, st, timestamp);
|
||||
if (ret < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue