Commit 3e82fb2b authored by bcoudurier's avatar bcoudurier

put dv demuxing code around ifdef

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@6066 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent e10fd1ad
...@@ -1730,19 +1730,22 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -1730,19 +1730,22 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
av_log(mov->fc, AV_LOG_ERROR, "stream %d, offset 0x%llx: partial file\n", sc->ffindex, sample->pos); av_log(mov->fc, AV_LOG_ERROR, "stream %d, offset 0x%llx: partial file\n", sc->ffindex, sample->pos);
return -1; return -1;
} }
#ifdef CONFIG_DV_DEMUXER
if (sc->dv_audio_container) { if (sc->dv_audio_container) {
dv_get_packet(mov->dv_demux, pkt); dv_get_packet(mov->dv_demux, pkt);
dprintf("dv audio pkt size %d\n", pkt->size); dprintf("dv audio pkt size %d\n", pkt->size);
} else { } else {
#endif
url_fseek(&s->pb, sample->pos, SEEK_SET); url_fseek(&s->pb, sample->pos, SEEK_SET);
av_get_packet(&s->pb, pkt, sample->size); av_get_packet(&s->pb, pkt, sample->size);
#ifdef CONFIG_DV_DEMUXER
if (mov->dv_demux) { if (mov->dv_demux) {
void *pkt_destruct_func = pkt->destruct; void *pkt_destruct_func = pkt->destruct;
dv_produce_packet(mov->dv_demux, pkt, pkt->data, pkt->size); dv_produce_packet(mov->dv_demux, pkt, pkt->data, pkt->size);
pkt->destruct = pkt_destruct_func; pkt->destruct = pkt_destruct_func;
} }
} }
#endif
pkt->stream_index = sc->ffindex; pkt->stream_index = sc->ffindex;
pkt->dts = sample->timestamp; pkt->dts = sample->timestamp;
if (sc->ctts_data) { if (sc->ctts_data) {
......
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