|
|
@ -1709,10 +1709,10 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c |
|
|
|
|
|
|
|
|
|
|
|
if ((ret = avfilter_graph_create_filter(&filt_src, &input_filter, "src", |
|
|
|
if ((ret = avfilter_graph_create_filter(&filt_src, &input_filter, "src", |
|
|
|
NULL, is, graph)) < 0) |
|
|
|
NULL, is, graph)) < 0) |
|
|
|
goto the_end; |
|
|
|
return ret; |
|
|
|
if ((ret = avfilter_graph_create_filter(&filt_out, &ffsink, "out", |
|
|
|
if ((ret = avfilter_graph_create_filter(&filt_out, &ffsink, "out", |
|
|
|
NULL, &ffsink_ctx, graph)) < 0) |
|
|
|
NULL, &ffsink_ctx, graph)) < 0) |
|
|
|
goto the_end; |
|
|
|
return ret; |
|
|
|
|
|
|
|
|
|
|
|
if(vfilters) { |
|
|
|
if(vfilters) { |
|
|
|
AVFilterInOut *outputs = av_malloc(sizeof(AVFilterInOut)); |
|
|
|
AVFilterInOut *outputs = av_malloc(sizeof(AVFilterInOut)); |
|
|
@ -1729,18 +1729,18 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c |
|
|
|
inputs->next = NULL; |
|
|
|
inputs->next = NULL; |
|
|
|
|
|
|
|
|
|
|
|
if ((ret = avfilter_graph_parse(graph, vfilters, inputs, outputs, NULL)) < 0) |
|
|
|
if ((ret = avfilter_graph_parse(graph, vfilters, inputs, outputs, NULL)) < 0) |
|
|
|
goto the_end; |
|
|
|
return ret; |
|
|
|
av_freep(&vfilters); |
|
|
|
av_freep(&vfilters); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if ((ret = avfilter_link(filt_src, 0, filt_out, 0)) < 0) |
|
|
|
if ((ret = avfilter_link(filt_src, 0, filt_out, 0)) < 0) |
|
|
|
goto the_end; |
|
|
|
return ret; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ((ret = avfilter_graph_config(graph, NULL)) < 0) |
|
|
|
if ((ret = avfilter_graph_config(graph, NULL)) < 0) |
|
|
|
goto the_end; |
|
|
|
return ret; |
|
|
|
|
|
|
|
|
|
|
|
is->out_video_filter = filt_out; |
|
|
|
is->out_video_filter = filt_out; |
|
|
|
the_end: |
|
|
|
|
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1850,7 +1850,7 @@ static int subtitle_thread(void *arg) |
|
|
|
SDL_UnlockMutex(is->subpq_mutex); |
|
|
|
SDL_UnlockMutex(is->subpq_mutex); |
|
|
|
|
|
|
|
|
|
|
|
if (is->subtitleq.abort_request) |
|
|
|
if (is->subtitleq.abort_request) |
|
|
|
goto the_end; |
|
|
|
return 0; |
|
|
|
|
|
|
|
|
|
|
|
sp = &is->subpq[is->subpq_windex]; |
|
|
|
sp = &is->subpq[is->subpq_windex]; |
|
|
|
|
|
|
|
|
|
|
@ -1887,7 +1887,6 @@ static int subtitle_thread(void *arg) |
|
|
|
} |
|
|
|
} |
|
|
|
av_free_packet(pkt); |
|
|
|
av_free_packet(pkt); |
|
|
|
} |
|
|
|
} |
|
|
|
the_end: |
|
|
|
|
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|