aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-05-26 20:17:12 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-05-26 20:17:12 +0000
commit2692067a45e4cb4ce0028e170673f2b2f5039721 (patch)
tree19b10f28c74700113729a7ae6861c734e8bfab01 /libavformat/mov.c
parent4aa606ec179a7df514fe5839b7ab5e24b42145b8 (diff)
downloadffmpeg-2692067a45e4cb4ce0028e170673f2b2f5039721.tar.gz
AVPacket.pos
Originally committed as revision 4314 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 7779ac0a47..c2f7abffa0 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -253,9 +253,6 @@ typedef struct MOVStreamContext {
int time_scale;
long current_sample;
long left_in_chunk; /* how many samples before next chunk */
- /* specific MPEG4 header which is added at the beginning of the stream */
- unsigned int header_len;
- uint8_t *header_data;
MOV_esds_t esds;
} MOVStreamContext;
@@ -1672,7 +1669,6 @@ static void mov_free_stream_context(MOVStreamContext *sc)
av_freep(&sc->sample_to_chunk);
av_freep(&sc->sample_sizes);
av_freep(&sc->keyframes);
- av_freep(&sc->header_data);
av_freep(&sc->stts_data);
av_freep(&sc->ctts_data);
av_freep(&sc);
@@ -1974,18 +1970,7 @@ readchunk:
return -1;
url_fseek(&s->pb, offset, SEEK_SET);
- //av_log(NULL, AV_LOG_DEBUG, "READCHUNK hlen: %d %d off: %Ld pos:%Ld\n", size, sc->header_len, offset, url_ftell(&s->pb));
- if (sc->header_len > 0) {
- av_new_packet(pkt, size + sc->header_len);
- memcpy(pkt->data, sc->header_data, sc->header_len);
- get_buffer(&s->pb, pkt->data + sc->header_len, size);
- /* free header */
- av_freep(&sc->header_data);
- sc->header_len = 0;
- } else {
- av_new_packet(pkt, size);
- get_buffer(&s->pb, pkt->data, pkt->size);
- }
+ av_get_packet(&s->pb, pkt, size);
pkt->stream_index = sc->ffindex;
// If the keyframes table exists, mark any samples that are in the table as key frames.