The new location is more suited, as it is where the lavfi/lavc glue is defined.
Showing the changes to libavfilter/buffer.c (1 of 2 files). Show all
Unified · Split
| @@ -163,33 +163,6 @@ void avfilter_unref_bufferp(AVFilterBufferRef **ref) · 162 unmodified lines | ||
| 163 | 163 | *ref = NULL; |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | −int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src) | |
| 167 | −{ | |
| 168 | − dst->pts = src->pts; | |
| 169 | − dst->pos = av_frame_get_pkt_pos(src); | |
| 170 | − dst->format = src->format; | |
| 171 | − | |
| 172 | − switch (dst->type) { | |
| 173 | − case AVMEDIA_TYPE_VIDEO: | |
| 174 | − dst->video->w = src->width; | |
| 175 | − dst->video->h = src->height; | |
| 176 | − dst->video->sample_aspect_ratio = src->sample_aspect_ratio; | |
| 177 | − dst->video->interlaced = src->interlaced_frame; | |
| 178 | − dst->video->top_field_first = src->top_field_first; | |
| 179 | − dst->video->key_frame = src->key_frame; | |
| 180 | − dst->video->pict_type = src->pict_type; | |
| 181 | − break; | |
| 182 | − case AVMEDIA_TYPE_AUDIO: | |
| 183 | − dst->audio->sample_rate = src->sample_rate; | |
| 184 | − dst->audio->channel_layout = src->channel_layout; | |
| 185 | − break; | |
| 186 | − default: | |
| 187 | − return AVERROR(EINVAL); | |
| 188 | − } | |
| 189 | − | |
| 190 | − return 0; | |
| 191 | −} | |
| 192 | − | |
| 193 | 166 | int avfilter_copy_buf_props(AVFrame *dst, const AVFilterBufferRef *src) |
| 194 | 167 | { |
| 195 | 168 | int planes, nb_channels; |