Commit 0c8c386d authored by alex's avatar alex

fix feed read_header, avoid using put_tag in write_header, to be consistent...

fix feed read_header, avoid using put_tag in write_header, to be consistent with read_header, also some minor cosmetics


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4636 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 65b40af9
...@@ -132,7 +132,7 @@ static int ffm_write_header(AVFormatContext *s) ...@@ -132,7 +132,7 @@ static int ffm_write_header(AVFormatContext *s)
ffm->packet_size = FFM_PACKET_SIZE; ffm->packet_size = FFM_PACKET_SIZE;
/* header */ /* header */
put_tag(pb, "FFM1"); put_le32(pb, MKTAG('F', 'F', 'M', '1'));
put_be32(pb, ffm->packet_size); put_be32(pb, ffm->packet_size);
/* XXX: store write position in other file ? */ /* XXX: store write position in other file ? */
put_be64(pb, ffm->packet_size); /* current write position */ put_be64(pb, ffm->packet_size); /* current write position */
...@@ -480,6 +480,7 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -480,6 +480,7 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
fst = av_mallocz(sizeof(FFMStream)); fst = av_mallocz(sizeof(FFMStream));
if (!fst) if (!fst)
goto fail; goto fail;
s->streams[i] = st;
av_set_pts_info(st, 64, 1, 1000000); av_set_pts_info(st, 64, 1, 1000000);
...@@ -487,8 +488,8 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -487,8 +488,8 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
codec = st->codec; codec = st->codec;
/* generic info */ /* generic info */
st->codec->codec_id = get_be32(pb); codec->codec_id = get_be32(pb);
st->codec->codec_type = get_byte(pb); /* codec_type */ codec->codec_type = get_byte(pb); /* codec_type */
codec->bit_rate = get_be32(pb); codec->bit_rate = get_be32(pb);
st->quality = get_be32(pb); st->quality = get_be32(pb);
codec->flags = get_be32(pb); codec->flags = get_be32(pb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment