Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ld-ldf-reader build with current ffmpeg #665

Merged
merged 2 commits into from
Nov 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ld-ldf-reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <unistd.h>
#include <libavutil/samplefmt.h>
#include <libavutil/timestamp.h>
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>

static AVFormatContext *fmt_ctx = NULL;
Expand Down Expand Up @@ -97,7 +98,6 @@ static int open_codec_context(int *stream_idx,
int ret, stream_index;
AVStream *st;
const AVCodec *dec = NULL;
AVDictionary *opts = NULL;

ret = av_find_best_stream(fmt_ctx, type, -1, -1, NULL, 0);

Expand Down Expand Up @@ -133,7 +133,7 @@ static int open_codec_context(int *stream_idx,
}

/* Init the decoder */
if ((ret = avcodec_open2(*dec_ctx, dec, &opts)) < 0) {
if ((ret = avcodec_open2(*dec_ctx, dec, NULL)) < 0) {
fprintf(stderr, "Failed to open %s codec\n",
av_get_media_type_string(type));
return ret;
Expand Down