Commit fe19e138 authored by Michael Niedermayer's avatar Michael Niedermayer

cdg: Try to detect keyframes.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 045c5283
...@@ -53,6 +53,10 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -53,6 +53,10 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->stream_index = 0; pkt->stream_index = 0;
pkt->dts=pkt->pts= s->streams[0]->cur_dts; pkt->dts=pkt->pts= s->streams[0]->cur_dts;
if(ret>5 && (pkt->data[0]&0x3F) == 9 && (pkt->data[1]&0x3F)==1 && !(pkt->data[2+2+1] & 0x0F)){
pkt->flags = AV_PKT_FLAG_KEY;
}
return ret; return ret;
} }
......
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