summaryrefslogtreecommitdiff
path: root/libavformat/nsvdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-07-17 22:24:36 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-07-17 22:24:36 +0000
commit01f4895c682a1752bf6d138ffb0628470e16b85a (patch)
tree56a3dfce270dad38b97c8f7ff288cc23cfac54da /libavformat/nsvdec.c
parent4c1a012e9ceb0840688c547625208e7c4b81624a (diff)
changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
Originally committed as revision 4453 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/nsvdec.c')
-rw-r--r--libavformat/nsvdec.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c
index 91c2aabe69..27c7abc8cc 100644
--- a/libavformat/nsvdec.c
+++ b/libavformat/nsvdec.c
@@ -439,12 +439,12 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap)
if (!nst)
goto fail;
st->priv_data = nst;
- st->codec.codec_type = CODEC_TYPE_VIDEO;
- st->codec.codec_tag = vtag;
- st->codec.codec_id = codec_get_id(nsv_codec_video_tags, vtag);
- st->codec.width = vwidth;
- st->codec.height = vheight;
- st->codec.bits_per_sample = 24; /* depth XXX */
+ st->codec->codec_type = CODEC_TYPE_VIDEO;
+ st->codec->codec_tag = vtag;
+ st->codec->codec_id = codec_get_id(nsv_codec_video_tags, vtag);
+ st->codec->width = vwidth;
+ st->codec->height = vheight;
+ st->codec->bits_per_sample = 24; /* depth XXX */
av_set_pts_info(st, 64, framerate.den, framerate.num);
st->start_time = 0;
@@ -460,17 +460,17 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap)
if (!nst)
goto fail;
st->priv_data = nst;
- st->codec.codec_type = CODEC_TYPE_AUDIO;
- st->codec.codec_tag = atag;
- st->codec.codec_id = codec_get_id(nsv_codec_audio_tags, atag);
+ st->codec->codec_type = CODEC_TYPE_AUDIO;
+ st->codec->codec_tag = atag;
+ st->codec->codec_id = codec_get_id(nsv_codec_audio_tags, atag);
st->start_time = 0;
// st->duration = nsv->duration; //FIXME
st->need_parsing = 1; /* for PCM we will read a chunk later and put correct info */
/* XXX:FIXME */
- //st->codec.channels = 2; //XXX:channels;
- //st->codec.sample_rate = 1000;
- //av_set_pts_info(st, 64, 1, st->codec.sample_rate);
+ //st->codec->channels = 2; //XXX:channels;
+ //st->codec->sample_rate = 1000;
+ //av_set_pts_info(st, 64, 1, st->codec->sample_rate);
#endif
}
@@ -606,7 +606,7 @@ null_chunk_retry:
pkt = &nsv->ahead[NSV_ST_AUDIO];
/* read raw audio specific header on the first audio chunk... */
/* on ALL audio chunks ?? seems so! */
- if (asize && st[NSV_ST_AUDIO]->codec.codec_tag == MKTAG('P', 'C', 'M', ' ')/* && fill_header*/) {
+ if (asize && st[NSV_ST_AUDIO]->codec->codec_tag == MKTAG('P', 'C', 'M', ' ')/* && fill_header*/) {
uint8_t bps;
uint8_t channels;
uint16_t samplerate;
@@ -622,13 +622,13 @@ null_chunk_retry:
}
bps /= channels; // ???
if (bps == 8)
- st[NSV_ST_AUDIO]->codec.codec_id = CODEC_ID_PCM_U8;
+ st[NSV_ST_AUDIO]->codec->codec_id = CODEC_ID_PCM_U8;
samplerate /= 4;/* UGH ??? XXX */
channels = 1;
- st[NSV_ST_AUDIO]->codec.channels = channels;
- st[NSV_ST_AUDIO]->codec.sample_rate = samplerate;
+ st[NSV_ST_AUDIO]->codec->channels = channels;
+ st[NSV_ST_AUDIO]->codec->sample_rate = samplerate;
av_set_pts_info(st[NSV_ST_AUDIO], 64, 1,
- st[NSV_ST_AUDIO]->codec.sample_rate);
+ st[NSV_ST_AUDIO]->codec->sample_rate);
PRINT(("NSV RAWAUDIO: bps %d, nchan %d, srate %ld\n", bps, channels, samplerate));
}
}
@@ -704,8 +704,8 @@ static int nsv_read_close(AVFormatContext *s)
av_free(ast->index_entries);
av_free(ast);
}
- av_free(st->codec.extradata);
- av_free(st->codec.palctrl);
+ av_free(st->codec->extradata);
+ av_free(st->codec->palctrl);
}
#endif