ts_parser: Change the delay-type if the video is specified in the target of demux
cosmetics
Integrate common code
Check the invalid case in callback function