Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] play_iframe() patch and cleanup



Hi,

the implementation of play_iframe() has never worked with vdr,
so vdr used a workaround.

The following patch against CVS would fix this:

---------------------------------------------------------------------
--- av7110.c.org	Sat Aug 23 17:35:11 2003
+++ av7110.c	Tue Aug 26 20:01:17 2003
@@ -4237,29 +4237,23 @@ dvb_audio_write(struct file *file, const
         return dvb_aplay(av7110, buf, count, file->f_flags&O_NONBLOCK, 0);
 }
 
-u8 iframe_header[] = { 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x00 };
-
 #define MIN_IFRAME 400000
 
 static int
 play_iframe(av7110_t *av7110, u8 *buf, unsigned int len, int nonblock)
 {
-        int i, n=1;
+        int i, n;
        
         if (!(av7110->playing&RP_VIDEO)) {
                 if (AV_StartPlay(av7110, RP_VIDEO) < 0) {
 			return -EBUSY;
 		}
-                n=MIN_IFRAME/len+1;
         }
 
 	/* setting n always > 1, fixes problems when playing stillframes
 	   consisting of I- and P-Frames */
 	n=MIN_IFRAME/len+1;
 
-	/* FIXME: nonblock? */
-	dvb_play(av7110, iframe_header, sizeof(iframe_header), 0, 1, 0);
-
 	for (i=0; i<n; i++)
                 dvb_play(av7110, buf, len, 0, 1, 1);
 
---------------------------------------------------------------------

Basically, the problem was the insertion of the iframe header.

The API doesn't specify that a iframe should be delivered *without*
header. If required, playing the header should be done within the loop!
Are there any applications which really require the header insertion?

If not I'd like to apply this patch to DVB and dvb-kernel CVS.

Oliver


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index