| 709 | } |
| 710 | |
| 711 | int av_frame_copy(AVFrame *dst, const AVFrame *src) |
| 712 | { |
| 713 | if (dst->format != src->format || dst->format < 0) |
| 714 | return AVERROR(EINVAL); |
| 715 | |
| 716 | if (dst->width > 0 && dst->height > 0) |
| 717 | return frame_copy_video(dst, src); |
| 718 | else if (dst->nb_samples > 0 && |
| 719 | (av_channel_layout_check(&dst->ch_layout))) |
| 720 | return frame_copy_audio(dst, src); |
| 721 | |
| 722 | return AVERROR(EINVAL); |
| 723 | } |
| 724 | |
| 725 | void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type) |
| 726 | { |