[FFmpeg-devel] [PATCH] avformat/rawenc: check stream type

Gyan Doshi gyandoshi at gmail.com
Sat Apr 7 14:32:38 EEST 2018


On 4/7/2018 4:35 PM, Carl Eugen Hoyos wrote:
> 2018-04-04 12:23 GMT+02:00, Gyan Doshi <gyandoshi at gmail.com>:
>> Validate codec of stream to be muxed except for data muxer.
> 
> What issue does your patch fix?

Had an user on SE sometime back extract a video stream to a .h264 (in 
order to retime PTS). The retiming didn't work since the stream was 
actually mpeg4 but the muxer hasn't complained. Might have been fine but 
ffmpeg's format probe settled on h264 so user couldn't proceed until we 
examined the source. So just added some basic checks. Initially strict 
but loosened due to Michael's feedback.

Users can still use data or rawvideo muxer to extract any random stream.

(I do see that rawvideo does not enforce a single stream. Why?)

Regards,
Gyan


More information about the ffmpeg-devel mailing list