Commit e738cee9 authored by Roman Shaposhnik's avatar Roman Shaposhnik

Complete support for OpenDML AVIs and AVIs > 2Gb.

Originally committed as revision 1814 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 80097bbf
...@@ -1363,9 +1363,9 @@ static int av_encode(AVFormatContext **output_files, ...@@ -1363,9 +1363,9 @@ static int av_encode(AVFormatContext **output_files,
/* no reencoding needed : output the packet directly */ /* no reencoding needed : output the packet directly */
/* force the input stream PTS */ /* force the input stream PTS */
//XXX/FIXME set keyframe flag from demuxer (or optionally from decoder)
memset(&avframe, 0, sizeof(AVFrame)); memset(&avframe, 0, sizeof(AVFrame));
ost->st->codec.coded_frame= &avframe; ost->st->codec.coded_frame= &avframe;
avframe.key_frame = pkt.flags & PKT_FLAG_KEY;
av_write_frame(os, ost->index, data_buf, data_size); av_write_frame(os, ost->index, data_buf, data_size);
ost->st->codec.frame_number++; ost->st->codec.frame_number++;
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#define AVIF_COPYRIGHTED 0x00020000 #define AVIF_COPYRIGHTED 0x00020000
#define AVI_MAX_RIFF_SIZE 0x40000000LL #define AVI_MAX_RIFF_SIZE 0x40000000LL
#define AVI_MASTER_INDEX_SIZE 256
offset_t start_tag(ByteIOContext *pb, const char *tag); offset_t start_tag(ByteIOContext *pb, const char *tag);
void end_tag(ByteIOContext *pb, offset_t start); void end_tag(ByteIOContext *pb, offset_t start);
......
...@@ -368,6 +368,7 @@ pkt_init: ...@@ -368,6 +368,7 @@ pkt_init:
pkt->size = avi->buf_size; pkt->size = avi->buf_size;
pkt->destruct = __destruct_pkt; pkt->destruct = __destruct_pkt;
pkt->stream_index = avi->stream_index; pkt->stream_index = avi->stream_index;
pkt->flags |= PKT_FLAG_KEY; // FIXME: We really should read index for that
avi->stream_index = !avi->stream_index; avi->stream_index = !avi->stream_index;
return 0; return 0;
} }
......
This diff is collapsed.
...@@ -83,6 +83,7 @@ static int dv_read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -83,6 +83,7 @@ static int dv_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->data = c->buf; pkt->data = c->buf;
pkt->size = c->size; pkt->size = c->size;
pkt->stream_index = c->is_audio; pkt->stream_index = c->is_audio;
pkt->flags |= PKT_FLAG_KEY;
c->is_audio = !c->is_audio; c->is_audio = !c->is_audio;
return c->size; return c->size;
......
...@@ -184,6 +184,7 @@ static inline int __get_frame(struct dv1394_data *dv, AVPacket *pkt) ...@@ -184,6 +184,7 @@ static inline int __get_frame(struct dv1394_data *dv, AVPacket *pkt)
pkt->size = dv->frame_size; pkt->size = dv->frame_size;
pkt->pts = dv->pts; pkt->pts = dv->pts;
pkt->stream_index = dv->stream; pkt->stream_index = dv->stream;
pkt->flags |= PKT_FLAG_KEY;
dv->stream ^= 1; dv->stream ^= 1;
......
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