mirror of https://git.ffmpeg.org/ffmpeg.git
examples/filtering_video: fix memory leak
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
c0a845f948
commit
f24b2e64b0
|
@ -211,18 +211,21 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
AVPacket packet;
|
AVPacket packet;
|
||||||
AVFrame *frame = av_frame_alloc();
|
AVFrame *frame;
|
||||||
AVFrame *filt_frame = av_frame_alloc();
|
AVFrame *filt_frame;
|
||||||
|
|
||||||
if (!frame || !filt_frame) {
|
|
||||||
perror("Could not allocate frame");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
fprintf(stderr, "Usage: %s file\n", argv[0]);
|
fprintf(stderr, "Usage: %s file\n", argv[0]);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
frame = av_frame_alloc();
|
||||||
|
filt_frame = av_frame_alloc();
|
||||||
|
if (!frame || !filt_frame) {
|
||||||
|
perror("Could not allocate frame");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
if ((ret = open_input_file(argv[1])) < 0)
|
if ((ret = open_input_file(argv[1])) < 0)
|
||||||
goto end;
|
goto end;
|
||||||
if ((ret = init_filters(filter_descr)) < 0)
|
if ((ret = init_filters(filter_descr)) < 0)
|
||||||
|
|
Loading…
Reference in New Issue