Merge commit 'e3fb74f7f9a8f1895381355f40c92cac3c1023d9'
* commit 'e3fb74f7f9a8f1895381355f40c92cac3c1023d9': lavfi: Always propagate hw_frames_ctx through links Merged-by: Matthieu Bouron <matthieu.bouron@gmail.com>
This commit is contained in:
5
ffmpeg.c
5
ffmpeg.c
@ -47,6 +47,7 @@
|
||||
#include "libavutil/parseutils.h"
|
||||
#include "libavutil/samplefmt.h"
|
||||
#include "libavutil/fifo.h"
|
||||
#include "libavutil/hwcontext.h"
|
||||
#include "libavutil/internal.h"
|
||||
#include "libavutil/intreadwrite.h"
|
||||
#include "libavutil/dict.h"
|
||||
@ -3421,7 +3422,9 @@ static int init_output_stream(OutputStream *ost, char *error, int error_len)
|
||||
!av_dict_get(ost->encoder_opts, "ab", NULL, 0))
|
||||
av_dict_set(&ost->encoder_opts, "b", "128000", 0);
|
||||
|
||||
if (ost->filter && av_buffersink_get_hw_frames_ctx(ost->filter->filter)) {
|
||||
if (ost->filter && av_buffersink_get_hw_frames_ctx(ost->filter->filter) &&
|
||||
((AVHWFramesContext*)av_buffersink_get_hw_frames_ctx(ost->filter->filter)->data)->format ==
|
||||
av_buffersink_get_format(ost->filter->filter)) {
|
||||
ost->enc_ctx->hw_frames_ctx = av_buffer_ref(av_buffersink_get_hw_frames_ctx(ost->filter->filter));
|
||||
if (!ost->enc_ctx->hw_frames_ctx)
|
||||
return AVERROR(ENOMEM);
|
||||
|
Reference in New Issue
Block a user