mirror of
https://github.com/mpv-player/mpv
synced 2024-11-03 03:19:24 +01: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:
parent
b74c928530
commit
7306f6e2c1
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user