summaryrefslogtreecommitdiff
path: root/libavformat/dv.c
diff options
context:
space:
mode:
authorRoman Shaposhnik <roman@shaposhnik.org>2008-10-07 15:49:45 +0000
committerRoman Shaposhnik <roman@shaposhnik.org>2008-10-07 15:49:45 +0000
commitc9b0b38f45c111cc037f3423f3eef8041d3f87e2 (patch)
tree126fb98e05b3500a1b24c456a6eb6cab539985ca /libavformat/dv.c
parent8f271177b0c40a4a7063994d6c8c44a8b6990f5f (diff)
simplifying the code as per Michael's suggestion
Originally committed as revision 15577 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/dv.c')
-rw-r--r--libavformat/dv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/dv.c b/libavformat/dv.c
index 22d359b031..41010b189c 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -122,7 +122,7 @@ static int dv_extract_audio(uint8_t* frame, uint8_t* ppcm[4],
half_ch = sys->difseg_size/2;
/* We work with 720p frames split in half, thus even frames have channels 0,1 and odd 2,3 */
- ipcm = (sys->height == 720 && ((frame[1]>>2)&0x3) == 0)?2:0;
+ ipcm = (sys->height == 720 && !(frame[1]&0x0C))?2:0;
pcm = ppcm[ipcm++];
/* for each DIF channel */
@@ -339,7 +339,7 @@ int dv_produce_packet(DVDemuxContext *c, AVPacket *pkt,
/* We work with 720p frames split in half, thus even frames have channels 0,1 and odd 2,3 */
if (c->sys->height == 720) {
- if (((buf[1]>>2)&0x3))
+ if (buf[1]&0x0C)
c->audio_pkt[2].size = c->audio_pkt[3].size = 0;
else
c->audio_pkt[0].size = c->audio_pkt[1].size = 0;