History

use flags field and remove key_frame field

Originally committed as revision 18831 to svn://svn.ffmpeg.org/ffmpeg/trunk

Baptiste Coudurier committed 17 years ago

Commit ab4752e1 parent fe335ff1 file · +7 −5Browse files

Unified · Split

libavformat/movenc.c+7−5
@@ -44,13 +44,14 @@ · 43 unmodified lines
4444 #define MODE_IPOD 0x20
4545
4646 typedef struct MOVIentry {
47− unsigned int flags, size;
47+ unsigned int size;
4848 uint64_t pos;
4949 unsigned int samplesInChunk;
50− char key_frame;
5150 unsigned int entries;
5251 int cts;
5352 int64_t dts;
53+#define MOV_SYNC_SAMPLE 0x0001
54+ uint32_t flags;
5455 } MOVIentry;
5556
5657 typedef struct MOVIndex {
@@ -198,7 +199,7 @@ static int mov_write_stss_tag(ByteIOContext *pb, MOVTrack *track) · 141 unmodified lines
198199 entryPos = url_ftell(pb);
199200 put_be32(pb, track->entry); // entry count
200201 for (i=0; i<track->entry; i++) {
201− if(track->cluster[i].key_frame == 1) {
202+ if (track->cluster[i].flags & MOV_SYNC_SAMPLE) {
202203 put_be32(pb, i+1);
203204 index++;
204205 }
@@ -1877,9 +1878,10 @@ static int mov_write_packet(AVFormatContext *s, AVPacket *pkt) · 1672 unmodified lines
18771878 if (pkt->dts != pkt->pts)
18781879 trk->hasBframes = 1;
18791880 trk->cluster[trk->entry].cts = pkt->pts - pkt->dts;
1880− trk->cluster[trk->entry].key_frame = !!(pkt->flags & PKT_FLAG_KEY);
1881− if(trk->cluster[trk->entry].key_frame)
1881+ if (pkt->flags & PKT_FLAG_KEY) {
1882+ trk->cluster[trk->entry].flags = MOV_SYNC_SAMPLE;
18821883 trk->hasKeyframes++;
1884+ }
18831885 trk->entry++;
18841886 trk->sampleCount += samplesInChunk;
18851887 mov->mdat_size += size;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t