1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 21:06:00 +00:00

Mark I-frames as seekable only if we encode with one reference frame, IDR are always seekable

patch send by Loren Merritt


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13659 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
iive 2004-10-17 17:59:38 +00:00
parent b74c928530
commit 7306f6e2c1

View File

@ -304,7 +304,9 @@ static int put_image(struct vf_instance_s *vf, mp_image_t *mpi)
i_size += x264_nal_encode(mod->mux->buffer + i_size, &i_data, 1, &nal[i]);
}
if(i_size>0) {
muxer_write_chunk(mod->mux, i_size, (mod->pic.i_type == X264_TYPE_I)?0x10:0);
int keyframe = (mod->pic.i_type == X264_TYPE_IDR) ||
(mod->pic.i_type == X264_TYPE_I && frame_ref == 1);
muxer_write_chunk(mod->mux, i_size, keyframe?0x10:0);
}
return 1;
}