id	summary	reporter	owner	description	type	status	priority	component	version	resolution	keywords	cc	blockedby	blocking	reproduced	analyzed
1606	WMP have problem with wma files generated by FFmpeg  (slider is set at the end)	ami_stuff		"When I play wma file (with WMP) encoded by FFmpeg then the slider is automaticly set at the end of the playback.

The problem is probably that FFmpeg writes $FFFFFF in some place. When I repleace it with $000000 then WMP's slider is set at the beginning of the playback and moves forward correctly.

I have created this patch to mark the place where I'm in the file:

libavformat/asfenc.c:

{{{
    /* movie chunk, followed by packets of packet_size */
    asf->data_offset = cur_pos;
    ff_put_guid(pb, &ff_asf_data_header);
    avio_wl64(pb, data_chunk_size);
    ff_put_guid(pb, &ff_asf_my_guid);
-    avio_wl64(pb, asf->nb_packets); /* nb packets */
+    avio_wl64(pb, 0x2222222222222222);
    avio_w8(pb, 1); /* ??? */
    avio_w8(pb, 1); /* ??? */
}}}

When you look at the attached screenshot then you will notice these 0x22..., after them
there are problematic $FFFFFF, but I'm not sure what it is. When I modify them to $000000
then WMP's slider is set at the beginning of the playback, not at the end.

http://samples.mplayerhq.hu/A-codecs/AAC/file.avi


{{{
C:\>ffmpeg -i file.avi -vn -acodec wmav2 out.wma
ffmpeg version N-43160-g752344d Copyright (c) 2000-2012 the FFmpeg developers
  built on Aug  3 2012 02:38:06 with gcc 4.5.0 (GCC) 20100414 (Fedora MinGW 4.5.
0-1.fc14)
  configuration: --prefix=/var/www/users/research/ffmpeg/snapshots/build --arch=
x86 --target-os=mingw32 --cross-prefix=i686-pc-mingw32- --cc='ccache i686-pc-min
gw32-gcc' --enable-w32threads --enable-memalign-hack --enable-runtime-cpudetect
--enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -
lwinmm -lpthread' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snap
shots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/s
napshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3
--enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-
libvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libmp3lame --enable-libvpx --disable-decoder=libvpx
  libavutil      51. 66.100 / 51. 66.100
  libavcodec     54. 48.100 / 54. 48.100
  libavformat    54. 22.100 / 54. 22.100
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3.  5.101 /  3.  5.101
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[wmv3 @ 0x1ead6e0] WMV3 Complex Profile is not fully supported
Input #0, avi, from 'file.avi':
  Duration: 00:23:53.53, start: 0.000000, bitrate: 58 kb/s
    Stream #0:0: Video: wmv3 (Complex) (WMV3 / 0x33564D57), yuv420p, 640x480, 29
.97 tbr, 29.97 tbn, 29.97 tbc
    Stream #0:1: Audio: aac ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, s16, 14
7 kb/s
    Metadata:
      title           : gs1 AC3 T01 2_0ch 448Kbps DELAY 0ms
Output #0, asf, to 'out.wma':
  Metadata:
    WM/EncodingSettings: Lavf54.22.100
    Stream #0:0: Audio: wmav2 (a[1][0][0] / 0x0161), 48000 Hz, stereo, s16, 128
kb/s
    Metadata:
      title           : gs1 AC3 T01 2_0ch 448Kbps DELAY 0ms
Stream mapping:
  Stream #0:1 -> #0:0 (aac -> wmav2)
Press [q] to stop, [?] for help
size=     988kB time=00:00:53.76 bitrate= 150.6kbits/s
video:0kB audio:840kB subtitle:0 global headers:0kB muxing overhead 17.643010%
}}}
"	defect	closed	important	avformat	git-master	fixed	asf regression				0	1
