aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2006-05-17 03:03:53 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2006-05-17 03:03:53 +0000
commit103eee535284bb43146fc4b237d171fc0e4fa283 (patch)
tree14ad3aa3981df6df8c7ff19b2f577713aafcc563
parentb29bddab345dc38edaf8820203d20501edc7a410 (diff)
downloadffmpeg-103eee535284bb43146fc4b237d171fc0e4fa283.tar.gz
Now MPlayer should understand Smacker audio and video codecs.
Originally committed as revision 5389 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/smacker.c2
-rw-r--r--libavformat/smacker.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index a6f169aca6..162c68ada3 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -425,7 +425,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8
break;
case SMK_BLK_FULL:
mode = 0;
- if(avctx->codec_tag != 0) { // In case of Smacker v4 we have three modes
+ if(avctx->codec_tag == MKTAG('S', 'M', 'K', '4')) { // In case of Smacker v4 we have three modes
if(get_bits1(&gb)) mode = 1;
else if(get_bits1(&gb)) mode = 2;
}
diff --git a/libavformat/smacker.c b/libavformat/smacker.c
index 7733da3bd7..be01f5bde6 100644
--- a/libavformat/smacker.c
+++ b/libavformat/smacker.c
@@ -156,7 +156,7 @@ static int smacker_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->pix_fmt = PIX_FMT_PAL8;
st->codec->codec_type = CODEC_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_SMACKVIDEO;
- st->codec->codec_tag = smk->is_ver4;
+ st->codec->codec_tag = smk->magic;
/* Smacker uses 100000 as internal timebase */
if(smk->pts_inc < 0)
smk->pts_inc = -smk->pts_inc;
@@ -174,7 +174,7 @@ static int smacker_read_header(AVFormatContext *s, AVFormatParameters *ap)
av_set_pts_info(ast[i], 33, smk->pts_inc, tbase);
ast[i]->codec->codec_type = CODEC_TYPE_AUDIO;
ast[i]->codec->codec_id = (smk->rates[i] & SMK_AUD_PACKED) ? CODEC_ID_SMACKAUDIO : CODEC_ID_PCM_U8;
- ast[i]->codec->codec_tag = 0;
+ ast[i]->codec->codec_tag = MKTAG('S', 'M', 'K', 'A');
ast[i]->codec->channels = (smk->rates[i] & SMK_AUD_STEREO) ? 2 : 1;
ast[i]->codec->sample_rate = smk->rates[i] & 0xFFFFFF;
ast[i]->codec->bits_per_sample = (smk->rates[i] & SMK_AUD_16BITS) ? 16 : 8;