Commit 2c77f02d authored by michael's avatar michael

Only export packets which belong to the existing AVStream.

To export the others seperate AVStreams must be created!


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11622 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 9a165ba5
...@@ -107,6 +107,7 @@ typedef struct MOVStreamContext { ...@@ -107,6 +107,7 @@ typedef struct MOVStreamContext {
unsigned int bytes_per_frame; unsigned int bytes_per_frame;
unsigned int samples_per_frame; unsigned int samples_per_frame;
int dv_audio_container; int dv_audio_container;
int pseudo_stream_id;
} MOVStreamContext; } MOVStreamContext;
typedef struct MOVContext { typedef struct MOVContext {
...@@ -581,7 +582,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) ...@@ -581,7 +582,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
int color_dec; int color_dec;
int color_greyscale; int color_greyscale;
const uint8_t *color_table; const uint8_t *color_table;
int j; int j, pseudo_stream_id;
unsigned char r, g, b; unsigned char r, g, b;
get_byte(pb); /* version */ get_byte(pb); /* version */
...@@ -589,7 +590,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) ...@@ -589,7 +590,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
entries = get_be32(pb); entries = get_be32(pb);
while(entries--) { //Parsing Sample description table for(pseudo_stream_id=0; pseudo_stream_id<entries; pseudo_stream_id++) { //Parsing Sample description table
enum CodecID id; enum CodecID id;
MOV_atom_t a = { 0, 0, 0 }; MOV_atom_t a = { 0, 0, 0 };
offset_t start_pos = url_ftell(pb); offset_t start_pos = url_ftell(pb);
...@@ -607,6 +608,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) ...@@ -607,6 +608,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
url_fskip(pb, size - (url_ftell(pb) - start_pos)); url_fskip(pb, size - (url_ftell(pb) - start_pos));
continue; continue;
} }
sc->pseudo_stream_id= pseudo_stream_id;
st->codec->codec_tag = format; st->codec->codec_tag = format;
id = codec_get_id(codec_movaudio_tags, format); id = codec_get_id(codec_movaudio_tags, format);
...@@ -1345,6 +1347,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st) ...@@ -1345,6 +1347,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
dprintf(mov->fc, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", " dprintf(mov->fc, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", "
"size %d, distance %d, keyframe %d\n", st->index, current_sample, "size %d, distance %d, keyframe %d\n", st->index, current_sample,
current_offset, current_dts, sample_size, distance, keyframe); current_offset, current_dts, sample_size, distance, keyframe);
if(sc->sample_to_chunk[stsc_index].id - 1 == sc->pseudo_stream_id)
av_add_index_entry(st, current_offset, current_dts, sample_size, distance, av_add_index_entry(st, current_offset, current_dts, sample_size, distance,
keyframe ? AVINDEX_KEYFRAME : 0); keyframe ? AVINDEX_KEYFRAME : 0);
current_offset += sample_size; current_offset += sample_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment