+ flic->audio_stream_index = ast->index;
+
+ /* all audio frames are the same size, so use the size of the first chunk for block_align */
+ ast->codec->block_align = AV_RL32(&preamble[0]);
+ ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
+ ast->codec->codec_id = CODEC_ID_PCM_U8;
+ ast->codec->codec_tag = 0;
+ ast->codec->sample_rate = FLIC_TFTD_SAMPLE_RATE;
+ ast->codec->channels = 1;
+ ast->codec->sample_fmt = AV_SAMPLE_FMT_U8;
+ ast->codec->bit_rate = st->codec->sample_rate * 8;
+ ast->codec->bits_per_coded_sample = 8;
+ ast->codec->channel_layout = AV_CH_LAYOUT_MONO;
+ ast->codec->extradata_size = 0;
+
+ /* Since the header information is incorrect we have to figure out the
+ * framerate using block_align and the fact that the audio is 22050 Hz.
+ * We usually have two cases: 2205 -> 10 fps and 1470 -> 15 fps */
+ av_set_pts_info(st, 64, ast->codec->block_align, FLIC_TFTD_SAMPLE_RATE);
+ av_set_pts_info(ast, 64, 1, FLIC_TFTD_SAMPLE_RATE);
+ } else if (AV_RL16(&header[0x10]) == FLIC_CHUNK_MAGIC_1) {