ts: add probe func

This commit is contained in:
nareix 2016-07-29 07:50:21 +08:00
parent 563991132c
commit d5c3f87b5c

View File

@ -9,6 +9,10 @@ import (
func Handler(h *avutil.RegisterHandler) { func Handler(h *avutil.RegisterHandler) {
h.Ext = ".ts" h.Ext = ".ts"
h.Probe = func(b []byte) bool {
return b[0] == 0x47 && b[188] == 0x47
}
h.ReaderDemuxer = func(r io.Reader) av.Demuxer { h.ReaderDemuxer = func(r io.Reader) av.Demuxer {
return NewDemuxer(r) return NewDemuxer(r)
} }