On Sat, Oct 11, 2014 at 10:53:47PM -0300, James Almer wrote: > On 11/10/14 2:59 PM, Clément Bœsch wrote: > > --- > > libavcodec/ass.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/libavcodec/ass.c b/libavcodec/ass.c > > index ac1bfae..62981b6 100644 > > --- a/libavcodec/ass.c > > +++ b/libavcodec/ass.c > > @@ -34,6 +34,7 @@ int ff_ass_subtitle_header(AVCodecContext *avctx, > > { > > avctx->subtitle_header = av_asprintf( > > "[Script Info]\r\n" > > + "%s" /* FFmpeg signature */ > > "ScriptType: v4.00+\r\n" > > "PlayResX: 384\r\n" > > "PlayResY: 288\r\n" > > @@ -65,6 +66,7 @@ int ff_ass_subtitle_header(AVCodecContext *avctx, > > "\r\n" > > "[Events]\r\n" > > "Format: Layer, Start, End, Style, Name, MarginL, MarginR, > > MarginV, Effect, Text\r\n", > > + (avctx->flags & CODEC_FLAG_BITEXACT) ? "; Script generated by > > FFmpeg/Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION) "\r\n" : "", > > font, font_size, color, color, back_color, back_color, > > -bold, -italic, -underline, alignment); > > I think you wanted to do the inverse here. You can't use version macros when > bitexact > is requested. >
Mmh derp, indeed. > I'd say put "; Script generated by FFmpeg/Lavc\r\n" for bitexact cases, and > "; Script > generated by FFmpeg/" LIBAVCODEC_IDENT "\r\n" otherwise. > That way a signature is always added. Sure, OK, new patch attached. [...] -- Clément B.
From e52ca7b222d83a8e2c63d0193556e6161763f3f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= <u...@pkh.me> Date: Sat, 11 Oct 2014 18:37:43 +0200 Subject: [PATCH 7/7] avcodec/ass: add FFmpeg signature --- libavcodec/ass.c | 2 ++ tests/fate-run.sh | 2 +- tests/ref/fate/sub-aqtitle | 1 + tests/ref/fate/sub-charenc | 1 + tests/ref/fate/sub-jacosub | 1 + tests/ref/fate/sub-microdvd | 1 + tests/ref/fate/sub-movtext | 1 + tests/ref/fate/sub-mpl2 | 1 + tests/ref/fate/sub-mpsub | 1 + tests/ref/fate/sub-mpsub-frames | 1 + tests/ref/fate/sub-pjs | 1 + tests/ref/fate/sub-realtext | 1 + tests/ref/fate/sub-sami | 1 + tests/ref/fate/sub-srt | 1 + tests/ref/fate/sub-subviewer | 1 + tests/ref/fate/sub-subviewer1 | 1 + tests/ref/fate/sub-vplayer | 1 + tests/ref/fate/sub-webvtt | 1 + 18 files changed, 19 insertions(+), 1 deletion(-) diff --git a/libavcodec/ass.c b/libavcodec/ass.c index ac1bfae..fd00981 100644 --- a/libavcodec/ass.c +++ b/libavcodec/ass.c @@ -34,6 +34,7 @@ int ff_ass_subtitle_header(AVCodecContext *avctx, { avctx->subtitle_header = av_asprintf( "[Script Info]\r\n" + "; Script generated by FFmpeg/Lavc%s\r\n" "ScriptType: v4.00+\r\n" "PlayResX: 384\r\n" "PlayResY: 288\r\n" @@ -65,6 +66,7 @@ int ff_ass_subtitle_header(AVCodecContext *avctx, "\r\n" "[Events]\r\n" "Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\r\n", + !(avctx->flags & CODEC_FLAG_BITEXACT) ? AV_STRINGIFY(LIBAVCODEC_VERSION) : "", font, font_size, color, color, back_color, back_color, -bold, -italic, -underline, alignment); diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 2f18fa3..f00a0be 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -117,7 +117,7 @@ pcm(){ fmtstdout(){ fmt=$1 shift 1 - ffmpeg "$@" -f $fmt - + ffmpeg -flags +bitexact "$@" -f $fmt - } enc_dec_pcm(){ diff --git a/tests/ref/fate/sub-aqtitle b/tests/ref/fate/sub-aqtitle index 7c422c9..87253c9 100644 --- a/tests/ref/fate/sub-aqtitle +++ b/tests/ref/fate/sub-aqtitle @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-charenc b/tests/ref/fate/sub-charenc index 199653a..ed5cdbe 100644 --- a/tests/ref/fate/sub-charenc +++ b/tests/ref/fate/sub-charenc @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-jacosub b/tests/ref/fate/sub-jacosub index 4e719f6..a30fe4a 100644 --- a/tests/ref/fate/sub-jacosub +++ b/tests/ref/fate/sub-jacosub @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-microdvd b/tests/ref/fate/sub-microdvd index 73f17bb..f0eb331 100644 --- a/tests/ref/fate/sub-microdvd +++ b/tests/ref/fate/sub-microdvd @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-movtext b/tests/ref/fate/sub-movtext index 8c573ef..6a90e96 100644 --- a/tests/ref/fate/sub-movtext +++ b/tests/ref/fate/sub-movtext @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-mpl2 b/tests/ref/fate/sub-mpl2 index 7529e5b..72fc0fc 100644 --- a/tests/ref/fate/sub-mpl2 +++ b/tests/ref/fate/sub-mpl2 @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-mpsub b/tests/ref/fate/sub-mpsub index fffc3c4..890ceb0 100644 --- a/tests/ref/fate/sub-mpsub +++ b/tests/ref/fate/sub-mpsub @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-mpsub-frames b/tests/ref/fate/sub-mpsub-frames index 3d8ac5a..64528ec 100644 --- a/tests/ref/fate/sub-mpsub-frames +++ b/tests/ref/fate/sub-mpsub-frames @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-pjs b/tests/ref/fate/sub-pjs index 36f3fe5..799c62b 100644 --- a/tests/ref/fate/sub-pjs +++ b/tests/ref/fate/sub-pjs @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-realtext b/tests/ref/fate/sub-realtext index 6c67acd..cd9aa5a 100644 --- a/tests/ref/fate/sub-realtext +++ b/tests/ref/fate/sub-realtext @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-sami b/tests/ref/fate/sub-sami index 63c5019..caa85a2 100644 --- a/tests/ref/fate/sub-sami +++ b/tests/ref/fate/sub-sami @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-srt b/tests/ref/fate/sub-srt index 8b5e32b..4439857 100644 --- a/tests/ref/fate/sub-srt +++ b/tests/ref/fate/sub-srt @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-subviewer b/tests/ref/fate/sub-subviewer index ca203b4..19944f6 100644 --- a/tests/ref/fate/sub-subviewer +++ b/tests/ref/fate/sub-subviewer @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-subviewer1 b/tests/ref/fate/sub-subviewer1 index 86867a8..a75406b 100644 --- a/tests/ref/fate/sub-subviewer1 +++ b/tests/ref/fate/sub-subviewer1 @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-vplayer b/tests/ref/fate/sub-vplayer index 8017b62..6e804f6 100644 --- a/tests/ref/fate/sub-vplayer +++ b/tests/ref/fate/sub-vplayer @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-webvtt b/tests/ref/fate/sub-webvtt index 0c8f12b..8c63a90 100644 --- a/tests/ref/fate/sub-webvtt +++ b/tests/ref/fate/sub-webvtt @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 -- 2.1.2
pgp2Z12X_ey0S.pgp
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel