~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/libavformat/rtmppkt.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:23:28 UTC
  • mfrom: (0.4.7 sid)
  • mto: This revision was merged to the branch mainline in revision 76.
  • Revision ID: package-import@ubuntu.com-20120112222328-8jqdyodym3p84ygu
Tags: 2:1.0~rc4.dfsg1+svn34540-1
* New upstream snapshot
* upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
#include "libavcodec/bytestream.h"
23
23
#include "libavutil/avstring.h"
 
24
#include "libavutil/intfloat.h"
24
25
#include "avformat.h"
25
26
 
26
27
#include "rtmppkt.h"
36
37
void ff_amf_write_number(uint8_t **dst, double val)
37
38
{
38
39
    bytestream_put_byte(dst, AMF_DATA_TYPE_NUMBER);
39
 
    bytestream_put_be64(dst, av_dbl2int(val));
 
40
    bytestream_put_be64(dst, av_double2int(val));
40
41
}
41
42
 
42
43
void ff_amf_write_string(uint8_t **dst, const char *str)
317
318
        if (size == namelen && !memcmp(data-size, name, namelen)) {
318
319
            switch (*data++) {
319
320
            case AMF_DATA_TYPE_NUMBER:
320
 
                snprintf(dst, dst_size, "%g", av_int2dbl(AV_RB64(data)));
 
321
                snprintf(dst, dst_size, "%g", av_int2double(AV_RB64(data)));
321
322
                break;
322
323
            case AMF_DATA_TYPE_BOOL:
323
324
                snprintf(dst, dst_size, "%s", *data ? "true" : "false");
369
370
        return;
370
371
    switch (*data++) {
371
372
    case AMF_DATA_TYPE_NUMBER:
372
 
        av_log(ctx, AV_LOG_DEBUG, " number %g\n", av_int2dbl(AV_RB64(data)));
 
373
        av_log(ctx, AV_LOG_DEBUG, " number %g\n", av_int2double(AV_RB64(data)));
373
374
        return;
374
375
    case AMF_DATA_TYPE_BOOL:
375
376
        av_log(ctx, AV_LOG_DEBUG, " bool %d\n", *data);