[FFmpeg-devel] [PATCH 3/3] lavf/matroskaenc: make sure we don't mux side data magic.

Michael Niedermayer michaelni at gmx.at
Mon Dec 3 16:36:41 CET 2012


On Sat, Dec 01, 2012 at 12:43:28AM +0100, Clément Bœsch wrote:
> ---
>  libavformat/matroskaenc.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> index 2a8a2ea..2233d61 100644
> --- a/libavformat/matroskaenc.c
> +++ b/libavformat/matroskaenc.c
> @@ -1182,6 +1182,9 @@ static int mkv_write_packet_internal(AVFormatContext *s, AVPacket *pkt)
>          mkv->cluster_pts = FFMAX(0, ts);
>      }
>  
> +    if (codec->codec_id == AV_CODEC_ID_SUBRIP)
> +        av_packet_split_side_data(pkt); // drop trailing position info
> +
>      if (codec->codec_type != AVMEDIA_TYPE_SUBTITLE) {
>          mkv_write_block(s, pb, MATROSKA_ID_SIMPLEBLOCK, pkt, keyframe << 7);
>      } else if (codec->codec_id == AV_CODEC_ID_SSA) {
> -- 

ok, but make sure you dont modify the input / callers packet

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- 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/20121203/b50f2449/attachment.asc>


More information about the ffmpeg-devel mailing list