Browse Source

handle missing av_frame_get_channels from older versions

fixes #341

Change-Id: I881b63021c9aba0006bb35bd38b027fa3b0152f9
changes/58/12458/3
Richard Fuchs 9 years ago
parent
commit
aef463f1bb
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      recording-daemon/resample.c

+ 2
- 0
recording-daemon/resample.c View File

@ -37,9 +37,11 @@ resample:
if (!resample->avresample)
goto err;
#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(55, 0, 0)
if (!frame->channel_layout)
frame->channel_layout = av_get_default_channel_layout(
av_frame_get_channels(frame));
#endif
err = "failed to set resample option";
if ((errcode = av_opt_set_int(resample->avresample, "in_channel_layout",


Loading…
Cancel
Save