libdts support improvements by (Aurelien Jacobs)
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 26 Jul 2004 16:36:36 +0000 (16:36 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 26 Jul 2004 16:36:36 +0000 (16:36 +0000)
Originally committed as revision 3345 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/Makefile
libavcodec/dtsdec.c

index 4a82e28..45d632e 100644 (file)
@@ -76,6 +76,8 @@ endif
 # currently using libdts for dts decoding
 ifeq ($(CONFIG_DTS),yes)
 OBJS+= dtsdec.o
+CFLAGS += $(DTS_INC)
+EXTRALIBS += -ldts
 endif
 
 ifeq ($(CONFIG_FAAD),yes)
index 2bc88d0..397e74c 100644 (file)
@@ -258,6 +258,9 @@ dts_decode_frame (AVCodecContext *avctx, void *data, int *data_size,
               flags |= DTS_ADJUST_LEVEL;
               if (dts_frame (state, buf, &flags, &level, bias))
                 goto error;
+              avctx->sample_rate = sample_rate;
+              avctx->channels = channels_multi (flags);
+              avctx->bit_rate = bit_rate;
               for (i = 0; i < dts_blocks_num (state); i++)
                 {
                   if (dts_block (state))