Mercurial > libavformat.hg
diff rpl.c @ 3908:1d3d17de20ba libavformat
Bump Major version, this commit is almost just renaming bits_per_sample to
bits_per_coded_sample but that cannot be done seperately.
Patch by Luca Abeni
Also reset the minor version and fix the forgotton change to libfaad.
Note: The API/ABI should not be considered stable yet, there still may
be a change done here or there if some developer has some cleanup ideas and
patches!
author | michael |
---|---|
date | Mon, 08 Sep 2008 14:24:59 +0000 |
parents | 7a0230981402 |
children | ff780d8f1bbc |
line wrap: on
line diff
--- a/rpl.c Mon Sep 08 00:58:24 2008 +0000 +++ b/rpl.c Mon Sep 08 14:24:59 2008 +0000 @@ -142,7 +142,7 @@ vst->codec->codec_tag = read_line_and_int(pb, &error); // video format vst->codec->width = read_line_and_int(pb, &error); // video width vst->codec->height = read_line_and_int(pb, &error); // video height - vst->codec->bits_per_sample = read_line_and_int(pb, &error); // video bits per sample + vst->codec->bits_per_coded_sample = read_line_and_int(pb, &error); // video bits per sample error |= read_line(pb, line, sizeof(line)); // video frames per second fps = read_fps(line, &error); av_set_pts_info(vst, 32, fps.den, fps.num); @@ -157,7 +157,7 @@ case 124: vst->codec->codec_id = CODEC_ID_ESCAPE124; // The header is wrong here, at least sometimes - vst->codec->bits_per_sample = 16; + vst->codec->bits_per_coded_sample = 16; break; #if 0 case 130: @@ -184,20 +184,20 @@ ast->codec->codec_tag = audio_format; ast->codec->sample_rate = read_line_and_int(pb, &error); // audio bitrate ast->codec->channels = read_line_and_int(pb, &error); // number of audio channels - ast->codec->bits_per_sample = read_line_and_int(pb, &error); // audio bits per sample + ast->codec->bits_per_coded_sample = read_line_and_int(pb, &error); // audio bits per sample // At least one sample uses 0 for ADPCM, which is really 4 bits // per sample. - if (ast->codec->bits_per_sample == 0) - ast->codec->bits_per_sample = 4; + if (ast->codec->bits_per_coded_sample == 0) + ast->codec->bits_per_coded_sample = 4; ast->codec->bit_rate = ast->codec->sample_rate * - ast->codec->bits_per_sample * + ast->codec->bits_per_coded_sample * ast->codec->channels; ast->codec->codec_id = CODEC_ID_NONE; switch (audio_format) { case 1: - if (ast->codec->bits_per_sample == 16) { + if (ast->codec->bits_per_coded_sample == 16) { // 16-bit audio is always signed ast->codec->codec_id = CODEC_ID_PCM_S16LE; break; @@ -206,12 +206,12 @@ // samples needed. break; case 101: - if (ast->codec->bits_per_sample == 8) { + if (ast->codec->bits_per_coded_sample == 8) { // The samples with this kind of audio that I have // are all unsigned. ast->codec->codec_id = CODEC_ID_PCM_U8; break; - } else if (ast->codec->bits_per_sample == 4) { + } else if (ast->codec->bits_per_coded_sample == 4) { ast->codec->codec_id = CODEC_ID_ADPCM_IMA_EA_SEAD; break; }