[FFmpeg-devel] [PATCH] ffmpeg: insert bitmap subtitles as video in filters.

Nicolas George nicolas.george at normalesup.org
Wed Aug 1 22:55:00 CEST 2012

Le quintidi 15 thermidor, an CCXX, Stefano Sabatini a écrit :
> I suppose that means that the frames are pushed only if thery were
> previously requested on any of the buffersrc sources connected to the
> stream, but could not have been provided.

Yes, exactly.

> > +        sub2video_heartbeat(ist, pkt.pts);
> Should we call this function only for video packets?

First, I want to keep the changes outside the big hunk at a minimum. If
there are tests to be done, I want them near the beginning of the function
("if (type != VIDEO) return;") rather than at the call site "if (type ==
VIDEO) call();". Since the function is called only once, the compiler will
inline it, it does not make any difference in the code, but it makes the
patch less intrusive.

Second, I do not think this is necessary: the check on nb_failed_requests()
will more or less play that role, and the loop around it are quite cheap.
Also, I could imagine an audio+subtitles file and someone wanting to render
the subtitles on top of showwaves; it is far-fetched but conceivable.

> I couldn't spot any apparent error in the logic, so it is fine to me
> if reasonably tested and works.

Thanks. It works on the sample I have, I can test it on others if someone
provide them.

If there are no more remarks or objections, I will push this in two or three


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120801/469abed3/attachment.asc>

More information about the ffmpeg-devel mailing list