]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/blobdiff - libavformat/smacker.c
frsh: Export information about the last RTP contract and VRES
[frescor/ffmpeg.git] / libavformat / smacker.c
index 3aa08bda1a8768a5832ddb501659b20a44bf2b4b..7d0a8d59d486ab82a426e295f7e215250d5015a6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Smacker demuxer
- * Copyright (c) 2006 Konstantin Shishkov.
+ * Copyright (c) 2006 Konstantin Shishkov
  *
  * This file is part of FFmpeg.
  *
@@ -24,6 +24,7 @@
  */
 
 #include "libavutil/bswap.h"
+#include "libavutil/intreadwrite.h"
 #include "avformat.h"
 
 #define SMACKER_PAL 0x01
@@ -182,6 +183,7 @@ static int smacker_read_header(AVFormatContext *s, AVFormatParameters *ap)
             ast[i]->codec->bits_per_coded_sample = (smk->rates[i] & SMK_AUD_16BITS) ? 16 : 8;
             if(ast[i]->codec->bits_per_coded_sample == 16 && ast[i]->codec->codec_id == CODEC_ID_PCM_U8)
                 ast[i]->codec->codec_id = CODEC_ID_PCM_S16LE;
+            ast[i]->codec->sample_fmt = ast[i]->codec->bits_per_coded_sample == 8 ? SAMPLE_FMT_U8 : SAMPLE_FMT_S16;
             av_set_pts_info(ast[i], 64, 1, ast[i]->codec->sample_rate
                     * ast[i]->codec->channels * ast[i]->codec->bits_per_coded_sample / 8);
         }