]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/apc.c
Fix concat seeking SEEK_END case.
[ffmpeg] / libavformat / apc.c
index 683c0c257b49064a25f76ee0c717f44e416de961..14701d92296150575d8197ed785ce2a51e9d6121 100644 (file)
@@ -19,8 +19,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include <string.h>
 #include "avformat.h"
-#include "string.h"
 
 static int apc_probe(AVProbeData *p)
 {
@@ -32,7 +32,7 @@ static int apc_probe(AVProbeData *p)
 
 static int apc_read_header(AVFormatContext *s, AVFormatParameters *ap)
 {
-    ByteIOContext *pb = &s->pb;
+    ByteIOContext *pb = s->pb;
     AVStream *st;
 
     get_le32(pb); /* CRYO */
@@ -62,8 +62,8 @@ static int apc_read_header(AVFormatContext *s, AVFormatParameters *ap)
     if (get_le32(pb))
         st->codec->channels = 2;
 
-    st->codec->bits_per_sample = 4;
-    st->codec->bit_rate = st->codec->bits_per_sample * st->codec->channels
+    st->codec->bits_per_coded_sample = 4;
+    st->codec->bit_rate = st->codec->bits_per_coded_sample * st->codec->channels
                           * st->codec->sample_rate;
     st->codec->block_align = 1;
 
@@ -74,7 +74,7 @@ static int apc_read_header(AVFormatContext *s, AVFormatParameters *ap)
 
 static int apc_read_packet(AVFormatContext *s, AVPacket *pkt)
 {
-    if (av_get_packet(&s->pb, pkt, MAX_READ_SIZE) <= 0)
+    if (av_get_packet(s->pb, pkt, MAX_READ_SIZE) <= 0)
         return AVERROR(EIO);
     pkt->stream_index = 0;
     return 0;
@@ -82,7 +82,7 @@ static int apc_read_packet(AVFormatContext *s, AVPacket *pkt)
 
 AVInputFormat apc_demuxer = {
     "apc",
-    "CRYO APC format",
+    NULL_IF_CONFIG_SMALL("CRYO APC format"),
     0,
     apc_probe,
     apc_read_header,