[FFmpeg-devel] [PATCH] lavc: support subtitles charset conversion.

Nicolas George nicolas.george at normalesup.org
Fri Jan 4 11:58:51 CET 2013


Le quintidi 15 nivôse, an CCXXI, Clement Boesch a écrit :
> Adding a "support charset recoding" codec description property sounds like
> the most simple and reliable thing to do.

Simple, yes. Reliable... what if a codec supports several encodings in the
same packet? Does it "support charset recoding" or not? And does it tell
whether the conversion should be made PRE or POST (I strongly suspect that
teletext will need POST)?

> Patch welcome? I'm not sure I want a fficonv…

At some point, someone too lazy to install libiconv will propose it. But we
are not obliged to encourage them.

> av_new_packet does it

I stand corrected.

> Because it doesn't sound fatal.

IMHO, silently writing garbage in the output is worse than fatal.

>				  And to be honest, because I need to do
> larger changes to the code in this case (or use a goto, see the split
> thing). It can be done in a later commit.

At least, please add a warning and a comment.

> av_free_packet is used for the temporary packet created in the scope of
> recode_subtitle in case of error, where its content is completely
> unrelated to the local packet here. Here pkt_recoded is a copy of tmp, so
> it shares also stuff like the extradata split, which we don't want to
> destroy. The only thing that CAN differ from tmp is it's data/size,
> allocated inside recode_subtitle. This is what we destroy here.

Thanks for the explanation.

Regards,

-- 
  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/20130104/c1b8abde/attachment.asc>


More information about the ffmpeg-devel mailing list