summaryrefslogtreecommitdiffstats
path: root/demux/codec_tags.c
diff options
context:
space:
mode:
Diffstat (limited to 'demux/codec_tags.c')
-rw-r--r--demux/codec_tags.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/demux/codec_tags.c b/demux/codec_tags.c
index c7b48f6038..7e91291e9e 100644
--- a/demux/codec_tags.c
+++ b/demux/codec_tags.c
@@ -70,20 +70,20 @@ static const char *map_audio_pcm_tag(uint32_t tag, int bits)
}
}
-void mp_set_codec_from_tag(struct sh_stream *sh)
+void mp_set_codec_from_tag(struct mp_codec_params *c)
{
- sh->codec = lookup_tag(sh->type, sh->codec_tag);
+ c->codec = lookup_tag(c->type, c->codec_tag);
- if (sh->audio && sh->audio->bits_per_coded_sample) {
+ if (c->type == STREAM_AUDIO && c->bits_per_coded_sample) {
const char *codec =
- map_audio_pcm_tag(sh->codec_tag, sh->audio->bits_per_coded_sample);
+ map_audio_pcm_tag(c->codec_tag, c->bits_per_coded_sample);
if (codec)
- sh->codec = codec;
+ c->codec = codec;
}
}
-void mp_set_pcm_codec(struct sh_stream *sh, bool sign, bool is_float, int bits,
- bool is_be)
+void mp_set_pcm_codec(struct mp_codec_params *c, bool sign, bool is_float,
+ int bits, bool is_be)
{
// This uses libavcodec pcm codec names, e.g. "pcm_u16le".
char codec[64] = "pcm_";
@@ -95,7 +95,7 @@ void mp_set_pcm_codec(struct sh_stream *sh, bool sign, bool is_float, int bits,
mp_snprintf_cat(codec, sizeof(codec), "%d", bits);
if (bits != 8)
mp_snprintf_cat(codec, sizeof(codec), is_be ? "be" : "le");
- sh->codec = talloc_strdup(sh->audio, codec);
+ c->codec = talloc_strdup(c, codec);
}
static const char *const mimetype_to_codec[][2] = {