[Ffmpeg-devel] [PATCH] ffmpeg.c: raw subtitles stream support; vhook crashed if -vcodec copy

Alexey Sidelnikov avs99
Thu Oct 19 01:30:42 CEST 2006


I'm sorry, there are two non-related patches in one diff, but both are very 
simple, and both are for ffmpeg.c, so I hope that is okay.

1. First patch is to allow raw subtitle stream copying. It was proposed 
originally here:

http://article.gmane.org/gmane.comp.video.ffmpeg.devel/38587

but the author missed that if there is no subtitles at all in the input 
file, then ffmpeg will crash. So I just added one more check to av_encode() 
function.


2. Following this topic:

http://article.gmane.org/gmane.comp.video.ffmpeg.devel/38483

if pre_process_video_frame() is called when video stream is copied, then 
AVPicture is not valid in it, and ffmpeg will crash. I added 2 checks - one 
in av_encode() during streams sanity check - that will notify a user right 
now, and the other one just before pre_process_video_frame() call - to make 
sure ffmpeg won't crash somewhere in the future, when a new pre_process 
command will be added.

Alexey 


begin 666 ffmpeg.patch
M26YD97 at Z(&9F;7!E9RYC#0H]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]#0HM+2T@
M9F9M<&5G+F,)*')E=FES:6]N(#8W,S$I#0HK*RL at 9F9M<&5G+F,)*'=O<FMI
M;F<@8V]P>2D-"D! ("TQ,34P+#@@*S$Q-3 L,3(@0$ -"B *(" @(" @(" @
M(" @(&)U9F9E<E]T;U]F<F5E(#T at 3E5,3#L*(" @(" @(" @(" @(&EF("AI
M<W0M/G-T+3YC;V1E8RT^8V]D96-?='EP92 ]/2!#3T1%0U]465!%7U9)1$5/
M*2!["BT@(" @(" @(" @(" @(" @<')E7W!R;V-E<W-?=FED96]?9G)A;64H
M:7-T+" H0590:6-T=7)E("HI)G!I8W1U<F4L"BT@(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @)F)U9F9E<E]T;U]F<F5E*3L**R @
M(" @(" @(" @(" @("!I9B H:7-T+3YD96-O9&EN9U]N965D960I('L**R @
M(" @(" @(" @(" @(" @(" @<')E7W!R;V-E<W-?=FED96]?9G)A;64H:7-T
M+" H0590:6-T=7)E("HI)G!I8W1U<F4L("9B=69F97)?=&]?9G)E92D["BL@
M(" @(" @(" @(" @(" @?0HK(" @(" @(" @(" @(" @(&5L<V4@>PHK(" @
M(" @(" @(" @(" @(" @("!F<')I;G1F*'-T9&5R<BP@(G9I9&5O(&9R86UE
M(&-A;B!N;W0 at 8F4@<')E<')O8V5S<V5D(&EF('9I9&5O('-T<F5A;2!I<R!C
M;W!I961<;B(I.PHK(" @(" @(" @(" @(" @('T*(" @(" @(" @(" @('T*
M( H@(" @(" @(" @(" @+R\@<')E<')O8V5S<R!A=61I;R H=F]L=6UE*0I 
M0" M,30R-RPV("LQ-#,Q+#$R($! #0H@(" @(" @("!O<R ](&]U='!U=%]F
M:6QE<UMI73L*(" @(" @(" @;F)?;W-T<F5A;7,@*ST@;W,M/FYB7W-T<F5A
M;7,["B @(" @?0HK"BL@(" @:68@*&YB7V]S=')E86US(#T](# I('L**R @
M(" @(" @9G!R:6YT9BAS=&1E<G(L(").;R!A=61I;RP@=FED96\@;W(@<W5B
M=&ET;&5S('-T<F5A;7, at 879A:6QA8FQE7&XB*3L**R @(" @(" @97AI="@Q
M*3L**R @("!]"BL*(" @("!I9B H;F)?<W1R96%M7VUA<',@/B P("8F(&YB
M7W-T<F5A;5]M87!S("$](&YB7V]S=')E86US*2!["B @(" @(" @(&9P<FEN
M=&8H<W1D97)R+" B3G5M8F5R(&]F('-T<F5A;2!M87!S(&UU<W0@;6%T8V@@
M;G5M8F5R(&]F(&]U='!U="!S=')E86US7&XB*3L*(" @(" @(" @97AI="@Q
M*3L*0$ @+3$U-#0L-B K,34U-"PQ,2! 0 T*(" @(" @(" @(" @(" @("!C
M;V1E8RT^8FQO8VM?86QI9VX](&EC;V1E8RT^8FQO8VM?86QI9VX["B @(" @
M(" @(" @(" @(" @8G)E86L["B @(" @(" @(" @("!C87-E($-/1$5#7U19
M4$5?5DE$14\Z"BL@(" @(" @(" @(" @(" @:68@*&1O7V1E:6YT97)L86-E
M('Q\('5S:6YG7W9H;V]K*2!["BL@(" @(" @(" @(" @(" @(" @(&9P<FEN
M=&8H<W1D97)R+" B3F5I=&AE<B!D96EN=&5R;&%C92P@;F]R('9H;V]K(&%R
M92!A;&QO=V5D(&1U<FEN9R!V:61E;R!S=')E86T at 8V]P>6EN9R%<;D1E8V]D
M:6YG+V5N8V]D:6YG(&ES(')E<75I<F5D+EQN(BD["BL@(" @(" @(" @(" @
M(" @(" @(&5X:70H,2D["BL@(" @(" @(" @(" @(" @?0HK"B @(" @(" @
M(" @(" @(" @8V]D96,M/G!I>%]F;70@/2!I8V]D96,M/G!I>%]F;70["B @
M(" @(" @(" @(" @(" @8V]D96,M/G=I9'1H(#T@:6-O9&5C+3YW:61T:#L*
M(" @(" @(" @(" @(" @("!C;V1E8RT^:&5I9VAT(#T@:6-O9&5C+3YH96EG
M:'0["D! ("TS,3(S+#@@*S,Q,S at L-R! 0 T*(" @(" @(" @?0H@"B @(" @
M(" @(&EF("@A;V,M/FYB7W-T<F5A;7,I('L*+2 @(" @(" @(" @(&9P<FEN
M=&8H<W1D97)R+" B3F\@875D:6\@;W(@=FED96\@<W1R96%M<R!A=F%I;&%B
M;&5<;B(I.PHM(" @(" @(" @(" @97AI="@Q*3L**R @(" @(" @(" @(&9P
M<FEN=&8H<W1D97)R+" B3F]T93H at 3W5T<'5T(&9I;&4@=VEL;"!N;W0 at 8V]N
M=&%I;B!A('9I9&5O(&]R(&%U9&EO('-T<F5A;5QN(BD["B @(" @(" @('T*
J( H@(" @(" @("!O8RT^=&EM97-T86UP(#T@<F5C7W1I;65S=&%M<#L*
`
end






More information about the ffmpeg-devel mailing list