[FFmpeg-devel] decklink 24/32 bit question

Douglas Marsh ffmpeg at dx9s.net
Wed Oct 4 06:39:49 EEST 2017


After digging around in places, made the following changes:

dx at x299:~/git/ffmpeg$ git diff
diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp
index 3ce2cab..afd255f 100644
--- a/libavdevice/decklink_dec.cpp
+++ b/libavdevice/decklink_dec.cpp
@@ -937,7 +937,7 @@ av_cold int ff_decklink_read_header(AVFormatContext 
*avctx)
          goto error;
      }
      st->codecpar->codec_type  = AVMEDIA_TYPE_AUDIO;
-    st->codecpar->codec_id    = AV_CODEC_ID_PCM_S16LE;
+    st->codecpar->codec_id    = AV_CODEC_ID_PCM_S32LE;
      st->codecpar->sample_rate = bmdAudioSampleRate48kHz;
      st->codecpar->channels    = cctx->audio_channels;
      avpriv_set_pts_info(st, 64, 1, 1000000);  /* 64 bits pts in us */
@@ -1028,7 +1028,7 @@ av_cold int 
ff_decklink_read_header(AVFormatContext *avctx)
      }

      av_log(avctx, AV_LOG_VERBOSE, "Using %d input audio channels\n", 
ctx->audio_st->codecpar->channels);
-    result = ctx->dli->EnableAudioInput(bmdAudioSampleRate48kHz, 
bmdAudioSampleType16bitInteger, ctx->audio_st->codecpar->channels);
+    result = ctx->dli->EnableAudioInput(bmdAudioSampleRate48kHz, 
bmdAudioSampleType32bitInteger, ctx->audio_st->codecpar->channels);

      if (result != S_OK) {
          av_log(avctx, AV_LOG_ERROR, "Cannot enable audio input\n");


It doesn't work (the audio capture is close but wrong), but believe it 
is a step in the correct direction. Anybody have a clue? Saw several 
names in cpp,c,h files including: Ramiro Polla, Luca Barbato, Deti 
Fliegl, Rafaël Carré and Akamai Technologies Inc.

Thanks in advance!

--Doug (dx9s)


More information about the ffmpeg-devel mailing list