Unified · Split
| @@ -25,8 +25,8 @@ · 24 unmodified lines | |||
| 25 | #include "libavutil/channel_layout.h" | 25 | #include "libavutil/channel_layout.h" |
| 26 | #include "libavutil/common.h" | 26 | #include "libavutil/common.h" |
| 27 | #include "libavutil/eval.h" | 27 | #include "libavutil/eval.h" |
| 28 | #include "libavutil/frame.h" | ||
| 28 | #include "libavutil/hwcontext.h" | 29 | #include "libavutil/hwcontext.h" |
| 29 | #include "libavutil/imgutils.h" | ||
| 30 | #include "libavutil/internal.h" | 30 | #include "libavutil/internal.h" |
| 31 | #include "libavutil/opt.h" | 31 | #include "libavutil/opt.h" |
| 32 | #include "libavutil/pixdesc.h" | 32 | #include "libavutil/pixdesc.h" |
| @@ -1446,19 +1446,10 @@ int ff_inlink_make_frame_writable(AVFilterLink *link, AVFrame **rframe) · 1413 unmodified lines | |||
| 1446 | return ret; | 1446 | return ret; |
| 1447 | } | 1447 | } |
| 1448 | 1448 | ||
| 1449 | switch (link->type) { | 1449 | ret = av_frame_copy(out, frame); |
| 1450 | case AVMEDIA_TYPE_VIDEO: | 1450 | if (ret < 0) { |
| 1451 | av_image_copy(out->data, out->linesize, (const uint8_t **)frame->data, frame->linesize, | 1451 | av_frame_free(&out); |
| 1452 | frame->format, frame->width, frame->height); | 1452 | return ret; |
| 1453 | break; | ||
| 1454 | case AVMEDIA_TYPE_AUDIO: | ||
| 1455 | av_samples_copy(out->extended_data, frame->extended_data, | ||
| 1456 | 0, 0, frame->nb_samples, | ||
| 1457 | frame->channels, | ||
| 1458 | frame->format); | ||
| 1459 | break; | ||
| 1460 | default: | ||
| 1461 | av_assert0(!"reached"); | ||
| 1462 | } | 1453 | } |
| 1463 | 1454 | ||
| 1464 | av_frame_free(&frame); | 1455 | av_frame_free(&frame); |