# HG changeset patch # User michael # Date 1201378050 0 # Node ID 2fc866d3614f78ee827ec4916323a941eba28247 # Parent 354c859bbf669ac7890a19459a018a18d7f29307 Only export packets which belong to the existing AVStream. To export the others separate AVStreams must be created! diff -r 354c859bbf66 -r 2fc866d3614f mov.c --- a/mov.c Sat Jan 26 19:50:04 2008 +0000 +++ b/mov.c Sat Jan 26 20:07:30 2008 +0000 @@ -107,6 +107,7 @@ unsigned int bytes_per_frame; unsigned int samples_per_frame; int dv_audio_container; + int pseudo_stream_id; } MOVStreamContext; typedef struct MOVContext { @@ -581,7 +582,7 @@ int color_dec; int color_greyscale; const uint8_t *color_table; - int j; + int j, pseudo_stream_id; unsigned char r, g, b; get_byte(pb); /* version */ @@ -589,7 +590,7 @@ entries = get_be32(pb); - while(entries--) { //Parsing Sample description table + for(pseudo_stream_id=0; pseudo_stream_idpseudo_stream_id= pseudo_stream_id; st->codec->codec_tag = format; id = codec_get_id(codec_movaudio_tags, format); @@ -1345,6 +1347,7 @@ dprintf(mov->fc, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", " "size %d, distance %d, keyframe %d\n", st->index, current_sample, 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, keyframe ? AVINDEX_KEYFRAME : 0); current_offset += sample_size;