Commit 00a63277 authored by reimar's avatar reimar

100l, error out if subtitle encoder failed instead of writing an AVPacket

with ridiculous size and thus crashing.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19641 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 81d02c86
......@@ -828,6 +828,10 @@ static void do_subtitle_out(AVFormatContext *s,
sub->pts = av_rescale_q(pts, ist->st->time_base, AV_TIME_BASE_Q);
subtitle_out_size = avcodec_encode_subtitle(enc, subtitle_out,
subtitle_out_max_size, sub);
if (subtitle_out_size < 0) {
fprintf(stderr, "Subtitle encoding failed\n");
av_exit(1);
}
av_init_packet(&pkt);
pkt.stream_index = ost->index;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment