Commit d8407bba authored by Nicolas George's avatar Nicolas George

lavfi/avcodec: implement audio copy_frame_prop.

parent 32094285
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
*/ */
#include "avcodec.h" #include "avcodec.h"
#include "libavutil/opt.h"
int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src) int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src)
{ {
...@@ -38,6 +39,12 @@ int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src) ...@@ -38,6 +39,12 @@ int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src)
dst->video->top_field_first = src->top_field_first; dst->video->top_field_first = src->top_field_first;
dst->video->key_frame = src->key_frame; dst->video->key_frame = src->key_frame;
dst->video->pict_type = src->pict_type; dst->video->pict_type = src->pict_type;
break;
case AVMEDIA_TYPE_AUDIO:
dst->audio->sample_rate = av_frame_get_sample_rate(src);
break;
default:
return AVERROR(ENOSYS);
} }
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment