aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/dv.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-30 15:22:13 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-10-30 15:28:24 +0100
commit6f5f7f705d10e639cf047be216a94de1e39a96e9 (patch)
treef80bab61e34b6ad3bf73c165df9e3f7d9d6bdb4e /libavformat/dv.c
parente79c3858b35fcc77c68c33b627958e736686957e (diff)
parent08b028c18dc31b6de741861b9555669dcca4d12a (diff)
downloadffmpeg-6f5f7f705d10e639cf047be216a94de1e39a96e9.tar.gz
Merge commit '08b028c18dc31b6de741861b9555669dcca4d12a'
* commit '08b028c18dc31b6de741861b9555669dcca4d12a': Remove INIT_AVX from x86inc.asm. Remove usage of INIT_AVX in h264_intrapred_10bit.asm. dv: fix indentation Conflicts: libavformat/dv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/dv.c')
-rw-r--r--libavformat/dv.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/libavformat/dv.c b/libavformat/dv.c
index 75d2136628..ae39816a01 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -236,24 +236,24 @@ static int dv_extract_audio_info(DVDemuxContext* c, uint8_t* frame)
/* Dynamic handling of the audio streams in DV */
for (i = 0; i < ach; i++) {
- if (!c->ast[i]) {
- c->ast[i] = avformat_new_stream(c->fctx, NULL);
- if (!c->ast[i])
- break;
- avpriv_set_pts_info(c->ast[i], 64, 1, 30000);
- c->ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- c->ast[i]->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
-
- av_init_packet(&c->audio_pkt[i]);
- c->audio_pkt[i].size = 0;
- c->audio_pkt[i].data = c->audio_buf[i];
- c->audio_pkt[i].stream_index = c->ast[i]->index;
- c->audio_pkt[i].flags |= AV_PKT_FLAG_KEY;
- }
- c->ast[i]->codec->sample_rate = dv_audio_frequency[freq];
- c->ast[i]->codec->channels = 2;
- c->ast[i]->codec->bit_rate = 2 * dv_audio_frequency[freq] * 16;
- c->ast[i]->start_time = 0;
+ if (!c->ast[i]) {
+ c->ast[i] = avformat_new_stream(c->fctx, NULL);
+ if (!c->ast[i])
+ break;
+ avpriv_set_pts_info(c->ast[i], 64, 1, 30000);
+ c->ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO;
+ c->ast[i]->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
+
+ av_init_packet(&c->audio_pkt[i]);
+ c->audio_pkt[i].size = 0;
+ c->audio_pkt[i].data = c->audio_buf[i];
+ c->audio_pkt[i].stream_index = c->ast[i]->index;
+ c->audio_pkt[i].flags |= AV_PKT_FLAG_KEY;
+ }
+ c->ast[i]->codec->sample_rate = dv_audio_frequency[freq];
+ c->ast[i]->codec->channels = 2;
+ c->ast[i]->codec->bit_rate = 2 * dv_audio_frequency[freq] * 16;
+ c->ast[i]->start_time = 0;
}
c->ach = i;
@@ -271,14 +271,14 @@ static int dv_extract_video_info(DVDemuxContext *c, uint8_t* frame)
avctx = c->vst->codec;
avpriv_set_pts_info(c->vst, 64, c->sys->time_base.num,
- c->sys->time_base.den);
+ c->sys->time_base.den);
avctx->time_base= c->sys->time_base;
/* finding out SAR is a little bit messy */
vsc_pack = dv_extract_pack(frame, dv_video_control);
apt = frame[4] & 0x07;
is16_9 = (vsc_pack && ((vsc_pack[2] & 0x07) == 0x02 ||
- (!apt && (vsc_pack[2] & 0x07) == 0x07)));
+ (!apt && (vsc_pack[2] & 0x07) == 0x07)));
c->vst->sample_aspect_ratio = c->sys->sar[is16_9];
avctx->bit_rate = av_rescale_q(c->sys->frame_size, (AVRational){8,1},
c->sys->time_base);
@@ -336,12 +336,12 @@ int avpriv_dv_get_packet(DVDemuxContext *c, AVPacket *pkt)
int i;
for (i = 0; i < c->ach; i++) {
- if (c->ast[i] && c->audio_pkt[i].size) {
- *pkt = c->audio_pkt[i];
- c->audio_pkt[i].size = 0;
- size = pkt->size;
- break;
- }
+ if (c->ast[i] && c->audio_pkt[i].size) {
+ *pkt = c->audio_pkt[i];
+ c->audio_pkt[i].size = 0;
+ size = pkt->size;
+ break;
+ }
}
return size;
@@ -356,17 +356,17 @@ int avpriv_dv_produce_packet(DVDemuxContext *c, AVPacket *pkt,
if (buf_size < DV_PROFILE_BYTES ||
!(c->sys = avpriv_dv_frame_profile(c->sys, buf, buf_size)) ||
buf_size < c->sys->frame_size) {
- return -1; /* Broken frame, or not enough data */
+ return -1; /* Broken frame, or not enough data */
}
/* Queueing audio packet */
/* FIXME: in case of no audio/bad audio we have to do something */
size = dv_extract_audio_info(c, buf);
for (i = 0; i < c->ach; i++) {
- c->audio_pkt[i].pos = pos;
- c->audio_pkt[i].size = size;
- c->audio_pkt[i].pts = c->abytes * 30000*8 / c->ast[i]->codec->bit_rate;
- ppcm[i] = c->audio_buf[i];
+ c->audio_pkt[i].pos = pos;
+ c->audio_pkt[i].size = size;
+ c->audio_pkt[i].pts = c->abytes * 30000 * 8 / c->ast[i]->codec->bit_rate;
+ ppcm[i] = c->audio_buf[i];
}
if (c->ach)
dv_extract_audio(buf, ppcm, c->sys);