]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/ogg2.c
Trellis quantization support for adpcm_swf.
[ffmpeg] / libavformat / ogg2.c
index 8ca7b2d136f40eeb96daa8972142ec799720007d..2b4b1603b6dd86664781db5ecc761f83f448888e 100644 (file)
@@ -41,6 +41,7 @@ static ogg_codec_t *ogg_codecs[] = {
     &vorbis_codec,
     &theora_codec,
     &flac_codec,
+    &old_flac_codec,
     &ogm_video_codec,
     &ogm_audio_codec,
     &ogm_old_codec,
@@ -200,7 +201,7 @@ ogg_new_stream (AVFormatContext * s, uint32_t serial)
 
     st = av_new_stream (s, idx);
     if (!st)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
     av_set_pts_info(st, 64, 1, 1000000);
 
@@ -540,7 +541,7 @@ ogg_read_packet (AVFormatContext * s, AVPacket * pkt)
     //Get an ogg packet
     do{
         if (ogg_packet (s, &idx, &pstart, &psize) < 0)
-            return AVERROR_IO;
+            return AVERROR(EIO);
     }while (idx < 0 || !s->streams[idx]);
 
     ogg = s->priv_data;
@@ -548,7 +549,7 @@ ogg_read_packet (AVFormatContext * s, AVPacket * pkt)
 
     //Alloc a pkt
     if (av_new_packet (pkt, psize) < 0)
-        return AVERROR_IO;
+        return AVERROR(EIO);
     pkt->stream_index = idx;
     memcpy (pkt->data, os->buf + pstart, psize);
     if (os->lastgp != -1LL){
@@ -676,8 +677,6 @@ ogg_read_timestamp (AVFormatContext * s, int stream_index, int64_t * pos_arg,
 
 static int ogg_probe(AVProbeData *p)
 {
-    if (p->buf_size < 6)
-        return 0;
     if (p->buf[0] == 'O' && p->buf[1] == 'g' &&
         p->buf[2] == 'g' && p->buf[3] == 'S' &&
         p->buf[4] == 0x0 && p->buf[5] <= 0x7 )